Class Coin

java.lang.Object
  extended by Coin

public class Coin
extends java.lang.Object

Represents a coin

Version:
sp19
Author:
alchambers

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

Coin

public Coin(int denomination)
Creates a new coin with the given denomination

Parameters:
denomination - A value representing the coin denomination
Method Detail

getDenomination

public int getDenomination()
Returns the denomination of the coin

Returns:
The denomination

isTaken

public boolean isTaken()
Returns whether the coin has been taken

Returns:
True if the coin has been taken, false otherwise

setTaken

public void setTaken()
Sets the coin as having been taken