Question: Hello, Please help write program that calculates coins in Java Program should do the following: 1) Prompts the user to enter a positive integer. 2)

Hello,

Please help write program that calculates coins in Java

Program should do the following:

1) Prompts the user to enter a positive integer.

2) The program should calculate the least possible number of coins and display the result.

3) The program MUST display the results using proper grammar (singular or plural).

4) The program MUST validate the user input and NOT allow ANYTHING that is not an integer greater than or equal to zero.

The programs display must adhere to the following rules:

One coin per line.

Proper use of the singular or plural nouns; example 1 dime or 2 dimes.

Only display coins that are actually used in the result.

ACCEPTABLE display examples include:

2 quarters

1 dime

1 penny

2 dimes

1 nickel

4 pennies

1 quarter

3 pennies

UNACCEPTABLE examples include:

2 quarter(s)

1 dime(s)

1 nickel

1 penny

1 quarter

0 dimes

0 nickels

3 pennies

GENERAL RESTRICTIONS

No break statements to exit loops

Thank you

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!