DixonianCurrency Program - 20 Points Due Thursday, September 15 The island nation of Dixonia has a unique currency: There are only 8 different currency amounts. They use bills in denominations of 17, 7 and 3 dollars. They have coin values of 44, 15, 4 and 1 cent. Write a program in Java that will allow the user to enter any monetary amount and the program will return the number of each bill and coin to will equal that dollar amount. Your program should calculate the most efficient way of calculating that amount (fewest total number of bills and coins) For the output, you should output the number of each denomination of currency from largest to smallest. For example, for the given input 25.36, you would calculate the following number of each bill and coin: Enter monetary amount 25.36 $17 bills: 1 $7 bills: 1 $3 bills: 0 44¢ coins: 3 15¢ cent coins: 0 4¢ cent coins: 1 1¢ cent coins: 0 Your output will be 1103010 Your output would be 9020110 Hints: Convert from double to an integer amount so your mod function can be used. Use the ComputeChange program on pages 65-67 in your book if you need help. If you are going to output several integer variables side by side you can: Use one System.out.print statement for each variable Use a System.out.println statement but add + "" between each variable SOP(num1 + "" + num2); This will prevent the summing of variables.
DixonianCurrency Program - 20 Points Due Thursday, September 15 The island nation of Dixonia has a unique currency: There are only 8 different currency amounts. They use bills in denominations of 17, 7 and 3 dollars. They have coin values of 44, 15, 4 and 1 cent. Write a program in Java that will allow the user to enter any monetary amount and the program will return the number of each bill and coin to will equal that dollar amount. Your program should calculate the most efficient way of calculating that amount (fewest total number of bills and coins) For the output, you should output the number of each denomination of currency from largest to smallest. For example, for the given input 25.36, you would calculate the following number of each bill and coin: Enter monetary amount 25.36 $17 bills: 1 $7 bills: 1 $3 bills: 0 44¢ coins: 3 15¢ cent coins: 0 4¢ cent coins: 1 1¢ cent coins: 0 Your output will be 1103010 Your output would be 9020110 Hints: Convert from double to an integer amount so your mod function can be used. Use the ComputeChange program on pages 65-67 in your book if you need help. If you are going to output several integer variables side by side you can: Use one System.out.print statement for each variable Use a System.out.println statement but add + "" between each variable SOP(num1 + "" + num2); This will prevent the summing of variables.
dixonian_current_2015.docx