Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use Dev C + + Coding. You are required to create a prototype of a Vending Machine System to process and track the items.
Please use Dev C Coding.
You are required to create a prototype of a Vending Machine System to process and track the items. Create a simple user interface of the program in the console mode environment. The initial interface is as follows:
Vending Machine
Show Items
InventoryAdmin
Exit
Enter Option:
Use a loop to allow the user to select the option repeatedly until the Exit option is selected. When the user selects option the system will show the available items in the vending machine as follows.
Vending Machine
Stock Stock Stock
O U M
O U M
O U M
O U M
O U M
O U M
Enter Option :
You can implement the prototype up to five different stock items and each stock item can hold up to units of stock. The system displays the price of the item and the users have to insert the coins or notes accordingly for the payment. The system will calculate the amount and refund the balance to the users. In case insufficient amount in the system, the system will cancel the transaction and refund the money to the users. Upon the transaction is accepted, the particular purchased item will be removed from the system and the system will redisplay the available stocks to the users. For example.
Stock Stock Stock
U M
O U M
O U M
O U M
O U M
O U M
example of stock item was removed
The system will display a SOLD OUT message if the particular item quantity is empty in the stock. For example:
Vending Machine
Stock Stock Stock
O M
M
M
For the InventoryAdmin option, the owner can perform the following operations to control and manage the vending machine.
Replenishing stock refill the stock The owner can add additional stocks to the
system.
Display machine summary. The owner can display the summary of stock and available funds in the machine.
Reset stock. The owner can reset all the stock to zero SOLD OUT status
Change price. The owner can change the price for the particular stocks in the machine.
Change the title and stock header name Vending Machine and Stock Stock
Allocate extra funds to the system in case insufficient funds in the machine.
Design a suitable class to capture the stock details such as item name and price. In addition, use a suitable data structure such as queues or stacks to represent the stocks in the inventory system. Please do not use the builtin data structure such as vector in the system implementation.
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