Question: c++ programming Assignment Description. Create a C++ class to represent a soda vending machine. This simple vending machine has the following properties: 1. Member variables:
Assignment Description. Create a C++ class to represent a soda vending machine. This simple vending machine has the following properties: 1. Member variables: a count of the number of sodas left in the machine. Initially, there are 10 sodas in the machine 2. Operations (ie. methods): (a) getInventoryCount: rens the number of sodas left in the machine (b) purchaseSoda: the user supplies an amount of money as a parameter. The method returns the amount of change owed to the customer, assuming a soda costs $1.25. If the customer did not input enough money, the method returns 0. If the customer did have enough money, the number of sodas in the machine is decreased by one (e) refill: resets the number of sodas in the machine back to 10 Deliverables. Submit your cpp source code file in a folder named assign2 in your assignments folder (in another folder named ci133). Make your compiled file named assign2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
