Class Coin

java.lang.Object
  extended byCoin

public class Coin
extends java.lang.Object

A coin with a monetary value.


Constructor Summary
Coin(double aValue, java.lang.String aName)
          Constructs a coin.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
           
 java.lang.String getName()
          Gets the coin name.
 double getValue()
          Gets the coin value.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coin

public Coin(double aValue,
            java.lang.String aName)
Constructs a coin.

Parameters:
aValue - the monetary value of the coin.
aName - the name of the coin
Method Detail

equals

public boolean equals(java.lang.Object otherObject)

getName

public java.lang.String getName()
Gets the coin name.

Returns:
the name

getValue

public double getValue()
Gets the coin value.

Returns:
the value

hashCode

public int hashCode()

toString

public java.lang.String toString()