Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are asked to design the software of a Vending Machine using C language. Your program should have basic user interface displayed on the screen

You are asked to design the software of a Vending Machine using C language. Your program should have basic user interface displayed on the screen of the computer and should accept command from the keyboard. The software should be able to run standalone and its usage must be self-explanatory. The vending machine must provide both a client mode for purchasing products and an administrator mode for product reloading, product modification and changing prices.
The program should at least meet the following specifications:
Have two modes of operation: a client mode (CM) and an administrator mode (AM). The last one should be hidden to the client mode (e.g., secret option, password protected etc).
All products of the VM should be saved so that each time the program is run the updated menu is shown.
(CM) Products are loaded and displayed in a menu together with all possible options and what they mean.
(CM) Each product has an internal count corresponding to the quantity available (stock). Stock can be modified in AM.
(CM) If a product is out of stock, it cannot be purchased and there should be a clear indication for this in the menu.
(CM) There is an option for the client to buy a product after selecting it (e.g., giving a number correspond to the product) and paying the appropriate amount.
(CM) The purchase is indicated on the screen with a message (e.g. saying Please collect your in the slot below).
(CM) Inserting coins in the VM should be emulated using keyboard buttons. You must provide options for at most 3 coins (e.g.0.50,1 and 2).
(CM) Products should have various prices and not only equal to the 3 coins accepted.
(CM) The VM calculates change and informs the client for the change returned on the screen with a message (e.g., displaying: Change: 1.50. Please collect them in the slot below.).
(AM) Option for reloading each product with more items (change the quantity count).
(AM) Option to change the price for each product.
(AM) Option to add/delete a product.
(AM) Option to clear all quantities for all products.
(AM) All changes in this mode are saved (in a file or files) in order to be used at the CM

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions