Question: Write a complete program to calculate the value of dollars and cents represented by coins. Your program should accomplish these steps, in order: Part One:

Write a complete program to calculate the value of dollars and cents represented by coins. Your program should accomplish these steps, in order:
Part One: Generate the Number of Coins (12 points)
use the Random's nextInt(int) method to generate a random number that represents the number of quarters, dimes, nickels, and pennies
there should be at least one of each coin and a max of: 20 quarters, 50 dimes, 100 nickels, and 500 pennies
output the number of each coin to the user
(8) Part Two: Calculate the Value (12 points)
declare constants to represent the value of each coin
note: declare the constants outside of the main method (but inside the class) and declare as:
public static final datatype NAME =dots;
use arithmetic expressions to calculate how much total dollars and cents are represented by the coins
output the total value so that it always displays two decimal points
Part Three: Quarters Give-Away (7 points)
ask the user how many people will be given quarters
use division and modulus to calculate how many quarters each person will get and how many will be left over
output those values to the user
Additional Coding Requirements (4 points)
code should compile
follow Java naming conventions for variables (lower camel case with no underscores)
 Write a complete program to calculate the value of dollars and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!