Make change for customer
The item cost $33
The customer gives a $100 bill for a purchase
Write a program that gives the cashier instructions on what bills and coins to return to the customer.
Declare variables for all currency <= $100
Name the program MakeChange.java
Make a flowchart by hand to show the decisionmaking process of the program.
See http://dhscompsci.pbwiki.com/FlowChartProgramming
Hint: You may want to use the Modulus operator
Hint: Compile the code one line at a time to identify problems early in the programming process.
Hint: Mathematically work the problem out first on a piece of paper. Then, plug in the Java arithmetic operators. This will create a flow chart of the program for you. After that, you will be able to begin the java program, declare the variables, put in the arithmetic steps, then create the display statements, and end the program.
Hand in:
Your code with a sample of the results commented in after running it.
Your handwritten flowchart
Staple them together before the end of the period.
Followup program: MakeChange2
Comments (0)
You don't have permission to comment on this page.