Create a class that will contain at least one public method


Problem

Create a class that will contain at least one public method that looks like this:

public int[] payCalc(double amt)

If an amount is passed into this method, it should return an array of integers indicating what note/coin combination is required to make up the amount indicated. The array of integers should therefore correlate with our denominations i.e. element 0 should have a number in it, indicating how many R200 notes are required, element 1 for R100 notes etc, down to the last element, indicating the number of 1c coins required.

Then create a testing program that will make an instance of the class above, and then pass different values into this method. Consider using command-line arguments so that upon each invocation of the program the payCalc() method gets passed a different amount.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create a class that will contain at least one public method
Reference No:- TGS03225430

Expected delivery within 24 Hours