Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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
1[Show Items ]
2[Inventory-Admin ]
3[Exit ]
Enter Option: 1
Use a loop to allow the user to select the option repeatedly until the [Exit] option is selected. When the user selects option 1, the system will show the available items in the vending machine as follows.
[Vending Machine]
Stock 1 Stock 2 Stock 3
------------------------------------
O U M
O U M
O U M
O U M
O U M
O U M
Enter Option [1/2/3]: 1
You can implement the prototype up to five different stock items and each stock item can hold up to 20 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 1 Stock 2 Stock 3
------------------------------------
U M
O U M
O U M
O U M
O U M
O U M
(example of stock 1 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 1 Stock 2 Stock 3
------------------------------------
O M
M
M
For the Inventory-Admin option, the owner can perform the following operations to control and manage the vending machine.
1) Replenishing stock (refill the stock). The owner can add additional stocks to the
system.
2) Display machine summary. The owner can display the summary of stock and available funds in the machine.
3) Reset stock. The owner can reset all the stock to zero (SOLD OUT status).
4) Change price. The owner can change the price for the particular stocks in the machine.
5) Change the title and stock header name (Vending Machine and Stock 1, Stock
2...)
6) 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 built-in data structure such as vector in the system implementation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions