Class Coin

java.lang.Object
  extended by Coin
All Implemented Interfaces:
Measurable

public class Coin
extends java.lang.Object
implements Measurable

A coin with a monetary value.


Constructor Summary
Coin(double aValue, java.lang.String aName)
          Constructs a coin.
 
Method Summary
 double getMeasure()
          Computes the measure of the object.
 java.lang.String getName()
          Gets the coin name.
 double getValue()
          Gets the coin value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

getValue

public double getValue()
Gets the coin value.

Returns:
the value

getName

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

Returns:
the name

getMeasure

public double getMeasure()
Description copied from interface: Measurable
Computes the measure of the object.

Specified by:
getMeasure in interface Measurable
Returns:
the measure