Define a method called exactchange that takes total change


Problem: Exact Change- Methods

Define a method called exactChange that takes the total change amount in cents and an integer array as parameters. Method exactChange() calculates the change using the fewest coins and stores the number of each coin type used into the array parameter. Index 0-3 of the array parameter should contain the number of pennies, nickels, dimes, and quarters respectively. Then write a main program that reads the total change amount as an integer input, calls exactChange(), and outputs the change, one coin type per line. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies. Output "no change" if the input is 0 or less.

The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Define a method called exactchange that takes total change
Reference No:- TGS03172346

Expected delivery within 24 Hours