![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Write a C++ program to implement a cash register programWrite a C++ program to implement a cash register program. The program will
prompt the user to enter an amount equal to the amount of a purchase. The program will also prompt the user to enter an amount tendered. The program will read values for each item. The program will determine if the amount tendered was sufficient. If it was not, the program will calculate the amount the customer is short in his payment and print "The Amount tendered was ****. The amount of the purchase was ****. Please tender the additional amount of ***** ." If the amount tendered was sufficient, the program will print "The Amount tendered was ****. The amount of the purchase was ****. The total amount of change to be returned to the customer is ******." If the total amount to be returned is greater than zero, the program will print the non-zero amount of each denomination to be returned. Denominations will be in twenties, tens, fives, ones, quarters, dimes, nickels, and pennies. For example, If the purchase price is $3.37 and the amount tendered is $50.00 the program should print: The Amount tendered was $ 50.00. The amount of the purchase was $ 3.37. The total amount of change to be returned to the customer is $ 46.63. This will be returned as Twenties: 2 Fives: 1 Ones: 1 Quarters: 2 Dimes: 1 Pennies: 3 CSCI 135 Students: You must have a class called Change which has one integer private members for the number of each denomination: private: numTwenties numTens numFives numOnes numQuarters numDimes numPennies One functionality should be written to show the number of each denumination. One functionality should be written to set each number to 0. And another functionality that takes a parameter placeholder double which represents the amount to make change for, and fills the number of each denomination correctly. |
|||
|
#2
|
|||
|
|||
Re: How do i program this??? anyone??Here is a start for you:
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
Re: Write a C++ program to implement a cash register programOMG! ur so cool fakepoo! thanx dude! =)
|
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| Text-Based Roulette Game | mfm1983 | C++ Forum | 5 | 29-Nov-2006 13:20 |
| BOOKEEPING program, HELP!! | yabud | C Programming Language | 10 | 17-Nov-2006 04:48 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 20:37 |
| How to read particular memory location ? | realnapster | C Programming Language | 10 | 10-May-2006 10:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The