While writing a program to track an inventory of soda, you design a class named SodaMachine. Among the class’s methods are fill, which adds a given number of cans to the machine, and dispense, which subtracts a given number of cans from the machine. Implement the class SodaMachine. Then write a test program that informs the user when a soda machine’s inventory drops below ten cans.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here