ICS 111 Homework Assignment H02: Calculate Change

Write a program that helps a cashier calculate the correct change. The program should ask how how much the item cost. Then ask how much was paid. The program should tell the cashier how many dollars, quarters, dimes, nickels and pennies they should give the customer as change.

Hint: Use the ‘/’ and ‘%’ operators to figure out the number of quaters, dimes, nickels and pennies.

Turning in the Assignment

The assignment is due on Friday at 11:55pm. You may turn it in early.

  1. Conduct a personal review of your code before turning it in. Does your code follow the Java Coding Standard?

    Is it clear and well commented?

  2. Test your code.

    • Does it produce the correct output? What happens when the customer doesn’t pay enough?
  3. Sign into Laulima, then navigate to the ICS111 site. In the left hand side of the site, there is an Assignments tab/link. Click on it and view all of the posted assignments. Select the assignment that you want to turn in and attach your files and accept the honor pledge to submit the assignment.