Write a program that simulates a soft drink machine. The program should use a class that stores the following data members: - Drink Name - Drink Cost - Count of Drinks in a Machine and contains the following member functions: - Constructor: inputs the name, cost and count of a drink in the machine from user - Buy: receives the money amount as parameter, and gives out a can of the drink after checking whether there are any cans in the machine, and whether the user entered the correct amount of money. The fun
Comments
Leave a comment