HOME | Overview | Syllabus | Instructor | Lectures | Laboratories | Readings | Assignments | Resources | Other Links
CS 1713 Major Assignment 2:
The Vendomatic 2000 [Due November 2, 1999]

 

This is one of four major individual assignments that you are required to complete in this class. You MUST design and code this project on your own. You can ask for debugging help, particularly from the tutors, TA or instructor, but this project is to be your own work. The project relies builds on Project 1. You should start with the solution provided for Project 1.

The Vendomatic 1000 was an paralleled success---the chilled beverage machine has become a favorite meeting place in offices across the country. Vendomatic Inc. has just realized that people might actually pay money for dispensed chilled beverages. You have been assigned to design, implement and test the Vendomatic 2000, a new machine based on the Vendomatic 1000 that charges money for dispensed chilled beverages.

The Vendomatic 2000 waits for the user to press a button (myAskForBeverage). If the user presses the button (rather than clearing it), the Vendomatic 2000 pops up a window asking the customer to enter a specified amount of money (the cost of the item). If the customer enters at least the required amount, the Vendomatic 2000 displays the amount of change, and dispenses the drink. If the customer does not enter enough money, the Vendomatic 2000 refunds the entire amount and does not dispense a drink. In either case, the Vendomatic 2000 clears the button.

In part I you will implement a HandleMoney class that takes care of prompting the user and making change. In part II, you will incorporate the HandleMoney class into the vending machine. In part III, you will put a loop into the Operate method to continue until all drinks have been dispensed.