Question: Java code using computer method 1)- CoinCollection Write a class named CoinCollection that has the following fields: quarters an int that contains the number of
Java code using computer method 1)- CoinCollection Write a class named CoinCollection that has the following fields: quarters an int that contains the number of quarters in your collection dimes an int that contains the number of dimes in your collection nickels an int that contains the number of nickels in your collection pennies an int that contains the number of pennies in your collection The class has a method named compute Value that computes the monetary value of all the coins in your collection and returns the result as an int A class whose sole purpose is to exercise or test another class is referred to as a driver Write a driver class that creates coin collections, then calls the compute Value method of each to display their monetary value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
