Created
September 7, 2012 13:39
-
-
Save els-pnw/3666338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Complete the following programming assignment and submit your source code to me by uploading the file(s) to the drop box for this assignment, which you'll find near the end of this module. Please be sure to include your last name and the course number in the file name(s), like so: [your name], X436.2, Module 4 Code. | |
Write a cash register class. It should have the following methods: | |
AddTransaction(amount) – add an amount to a running total and increments the number of transactions | |
TransactionCount() – returns the number of transactions received | |
Total() – returns to total amount of the orders | |
ResetTransactions() – sets the total amount and transaction count to 0 | |
Register Count() – returns the number of cash registers created | |
Next, write an application that instantiates at least two register objects to prove that your class works. | |
P.S.: Don't worry about storing each individual order. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment