Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Module 1 Capstone - Vending Machine Software You're developing an application for the newest vending machine distributor, Umbrella Corp. They've released a new vending machine,
Module Capstone Vending Machine Software
You're developing an application for the newest vending machine distributor, Umbrella Corp. They've released a new vending machine, VendoMatic that's integrated with everyone's bank accounts, allowing customers to purchase products from their computers for their convenience.
Application requirements
The vending machine dispenses beverages, candy, chips, and gum. Sales report
The output sales report file is also pipedelimited for consistenc
Each vending machine item has a Name and a Price.
A main menu must display when the software runs, presenting the following options:
Display Vending Machine Items
Purchase
Exit
The vending machine reads its inventory from an input file when the vending machine starts.
The vending machine is automatically restocked each time the application runs.
When the customer selects Display Vending Machine Items", they're presented with a list of all items in the vending machine with its quantity remaining:
Each vending machine product has a slot identifier and a purchase price.
Each slot in the vending machine has enough room for of that product.
Every product is initially stocked to the maximum amount.
A product that has run out must indicate that it's SOLD OUT.
When the customer selects Purchase", they're guided through the purchasing process menu:
Current Money Provided: $
Feed Money
Select Product
Finish Transaction
The purchase process flow is as follows:
Selecting Feed Money" allows the customer to repeatedly feed money into the machine in whole dollar amounts.
The "Current Money Provided" indicates how much money the customer has fed into the machine.
Selecting Select Product" allows the customer to select a product to purchase.
Show the list of products available and allow the customer to enter a code to select an item.
If the product code doesn't exist, the vending machine informs the customer and returns them to the Purchase menu.
If a product is currently sold out, the vending machine informs the customer and returns them to the Purchase menu.
If a customer selects a valid product, it's dispensed to the customer.
Dispensing an item prints the item name, cost, and the money remaining. Dispensing also returns a message:
All chip items print "Crunch Crunch, Yum!"
All candy items print "Munch Munch, Yum!"
All drink items print "Glug Glug, Yum!"
All gum items print "Chew Chew, Yum!"
After the machine dispenses the product, the machine must update its balance accordingly and return the customer to the Purchase menu.
Selecting Finish Transaction" allows the customer to complete the transaction and receive any remaining change.
The machine returns the customer's money using nickels, dimes, and quarters using the smallest amount of coins possible
The machine's current balance updates to $ remaining.
After completing their purchase, the user returns to the "Main" menu to continue using the vending machine.
The vending machine logs all transactions to prevent theft from the vending machine.
Each purchase must generate a line in a file called Log.txt
The lines must follow the format shown in the following example.
The first dollar amount is the amount deposited, spent, or given as change.
The second dollar amount is the new balance.
:: PM FEED MONEY: $ $
:: PM FEED MONEY: $ $
:: PM Crunchie B $ $
:: PM Cowtales B $ $
:: PM GIVE CHANGE: $ $
Create as many of your classes as possible to be "testable" classes. Limit console input and output to as few classes as possible.
Sales Report
Provide a "Hidden" menu option on the main menu that writes to a sales report that shows the total sales since the machine started. The name of the file must include the date and time so each sales report is uniquely named.
An example of the output format appears at the end of this file.
Provide unit tests demonstrating that your code works correctly.
Vending machine data file
The input file that stocks the vending machine products is a pipe delimited file. Each line is a separate product in the file and follows this format:
Column Name Description
Slot Location The slot location in the vending machine containing the product.
Product Name The display name of the vending machine product.
Price The purchase price for the product.
Type The product type for this row.
For example:
APotato CrispsChip
BMoonpieCandy
BCowtalesCandy
CColaDrink
An input file is in your repository: vendingmachine.csv
Sales report
The output sales report file is also pipedelimited for consistency. Each line is a separate product with the number of sales for the applicable product. At the end of the report is a blank line followed by the TOTAL SALES dollar amount indicating the gross sales from the vending machine.
Please resolve in Java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started