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 points
use the Random's nextIntint 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: quarters, dimes, nickels, and pennies
output the number of each coin to the user
Part Two: Calculate the Value 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 GiveAway 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 points
code should compile
follow Java naming conventions for variables lower camel case with no underscores
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
