Question: In Java language . Examples: User enters 1 penny, 1 nickel, 1 dime, 1 quarter the program should output $.41 and 4 coins (this input/output

In Java language .

In Java language . Examples: User enters 1 penny, 1 nickel, 1

Examples:

User enters 1 penny, 1 nickel, 1 dime, 1 quarter the program should output $.41 and 4 coins (this input/output would show up on multiple lines)

User enters 1 pennies 1 nickels, -5 dimes, 5 quarters the program should output $1.31 and 7 coins and a message saying "you cannot have -5 dimes" (this input/output would show up on multiple lines)

For this lab, you will use input, output, math, methods and if statements to make a coin counting program. The user should be able to enter the number of pennies, nickels dimes and quarters that the program should state how much total money there is. Use the following chart for help: penny nickel 1 cent 5 cents 10 cents 25 cents .01 dollars .05 dollars .10 dollars .25 dollars dime quarter . A good program will include all of the following: Gives the user clear instructions on what to enter All data should be collected in main and passed (using parameters) to method(s) that calculate and return the value of the coin(s) - no math in main and no printing in the calculation method(s) Calculates the total value of the coins Outputs the total number of coins If a user enters a negative amount of coins, it should print a warning message and set that coin number to O At least 1 comment

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!