Docsity

Assignment 2: Cashier - Java Programming | COP 2250, Assignments of Javascript programming

Toggle sidebar
bg1
COP 2250 sections 2
Assignment 2: Cashier
Due Date: February 25, 2008 at the beginning of the class
Late assignments will not be accepted.
Write a program that helps a cashier to give change. The program has two inputs: amount
due and the amount received from the customer. The program must prompt the user to
enter these values. The input must be formatted in dollars such as $10.54 or $100.87.
The program must compute and print the amount due, the amount tendered; the number
of Twenty, Ten, Five and One dollar bills and Quarters, Dimes, Nickels and Pennies that
must be given back to the customer. The output must be properly labeled and formatted.
The program must use the Scanner class to read the input and the NumberFormat (See the
example on page 123 of text) class to format amount due, the amount tendered.
Your program must include a certification heading as discussed in class. (Please refer
Program Certification Template in course site);
Turn in an envelope containing : Print out of all your .java source code.

Partial preview of the text

Download Assignment 2: Cashier - Java Programming | COP 2250 and more Assignments Javascript programming in PDF only on Docsity!

COP 2250 sections 2

Assignment 2: Cashier

Due Date: February 25, 2008 at the beginning of the class

Late assignments will not be accepted.

Write a program that helps a cashier to give change. The program has two inputs: amount due and the amount received from the customer. The program must prompt the user to enter these values. The input must be formatted in dollars such as $10.54 or $100.87. The program must compute and print the amount due, the amount tendered; the number of Twenty, Ten, Five and One dollar bills and Quarters, Dimes, Nickels and Pennies that must be given back to the customer. The output must be properly labeled and formatted. The program must use the Scanner class to read the input and the NumberFormat (See the example on page 123 of text) class to format amount due, the amount tendered. Your program must include a certification heading as discussed in class. (Please refer Program Certification Template in course site); Turn in an envelope containing: Print out of all your .java source code.