java.lang.ObjectCoin
public class Coin
Represents a coin
| Constructor Summary | |
|---|---|
Coin(int denomination)
Creates a new coin with the given denomination |
|
| Method Summary | |
|---|---|
int |
getDenomination()
Returns the denomination of the coin |
boolean |
isTaken()
Returns whether the coin has been taken |
void |
setTaken()
Sets the coin as having been taken |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Coin(int denomination)
denomination - A value representing the coin denomination| Method Detail |
|---|
public int getDenomination()
public boolean isTaken()
public void setTaken()