Implement in Java a class Coin that describes a coin with a name (e.g. dime) and a value (e.g. 10 cents).
Also implement a class Wallet that describes a collection of coins. Supply a method add() to add a coin to a wallet, and a method printContent() that prints out to standard output the contents of a wallet in the following format:
coinName (coinValue): numberOfCoins
penny (1 cent): 11
In order to test your Wallet class you'll also implement a class WalletTest whose main() method does the following:
Please note that the following two coins are identical:
dime (10 cents)
In addition to the above, your Wallet should supply a method equals() that tests whether two coins have the same name and value.
Don't forget to re-read the syllabus to make sure you understand all the deliverables for assignments in this class, including this one.
$Id: hw1.html,v 1.1 2014/08/31 19:16:42 virgil Exp $