Modifier and Type | Method and Description |
---|---|
Owner |
OwnedPiggyBank.getOwner()
Returns the owner of this piggy bank.
|
Modifier and Type | Method and Description |
---|---|
Coin |
OwnedPiggyBank.remove(Owner user,
Coin coin)
Allows the owner of this piggy bank to remove a coin equal to the value
of the specified coin from this piggy bank.
|
List<Coin> |
OwnedPiggyBank.removeCoins(Owner user,
int value)
Allows the owner of this piggy bank to remove
the smallest number of coins whose total value in cents is equal
to the specified value in cents from this piggy bank.
|
Constructor and Description |
---|
OwnedPiggyBank(Owner owner)
Initializes this piggy bank so that it has the specified owner
and no coins.
|