Question: Design and implements a program that asks the User for their name and randomly generates a monetary amount between $0.01 and $500.00. Then determine

Design and implements a program that asks the User for their name and randomly generates a monetary amount between $0.01 and $500.00. Then determine the least number of dollars (ten dollar bills, five dollar bills, and one dollar bill) and coins (quarters, dimes, nickels and pennies) are needed to represent that amount, starting with the highest. Your program should demonstrate you understanding of variables, data types, assignments, the Random, Math, NumberFormat String, and Scanner classes as well as data conversion (specifically casting) and expressions. Example outputs: What is your name? Clare What is your name? John What is your name? McKenna What is your name? Jane Clare, you have: $1 John, you have: $4 McKenna, you have: Jane, you have: $10 6.41 7.89 $22.90 7.91 $10 1 $10 : 4 $10 2 $10 10 $5 1 $5 1 $5 0 $5 : 1 $1 1 $1 : 2 $1 2 $1 : 2 Quarters: 1 Dimes : 1 Nickels : 1 Pennies 1 Quarters: 3 Dimes : 1 Nickels 0 Pennies 4 Quarters: 3 Quarters: 3 Dimes : 1 Nickels : 1 Dimes 1 Nickels : 1 Pennies : 0 Pennies : 1
Step by Step Solution
There are 3 Steps involved in it
import javatextNumberFormat import javautilRandom import javautilScanner public class MoneyCounter p... View full answer
Get step-by-step solutions from verified subject matter experts
