سلام عليكم

محتاج مساعدة بخصوص هذا السؤال

والرجاء المساعدة لأن تعتمد عليه درجة النجاح

:ah27:


وهذا السؤال

Write a program that simulates Vending Machine.

User of the machine inserts coins. (can insert 10 cents or 25 cents)
Machine reports the total money inserted in it, then user selects the button for the drink to choice. (5 different kind of drinks are available and each of their price may be different.)
If the person insert enough money and if the selected item is in stock, the beverage can drops into the bin and change is dispensed. If person is not entered enough money , message is displayed on the screen. If the item is out stock "out_of_stock" message is displayed.
Sample outputs:
(input money until user input s: (s for stop))
Input money: 25
Input money: 25
Input money: 25
Input money: 25
Input money: s

You entered $1.00
0 Coke ($1.25)
1 Pepsi ($1.25)
2 7-Up ($1.00)
3 Bixi ($0.75)
4 Uludag ($0.75)
5 Return money and exit.


Create 3 classes: 1- Money Control, 2- Stock Control 3- Vending Machine
1- Money Control class has one attribute called input_amount.
2- Stock Control class has three attributes: beverage, cost_of_the_beverage and total_amount_in_stock
3- Vending Machine has five different beverages(use array), and money bank.: (use composition)
You set your own stock, and add necessary functions.
In main create one machine, and test your program.
Vending Machine Object


وان شاء الله ما اكون طولت عليكم



مع التحية والسلام



ابن العراق



:ah49: