01: /**
02:    A coin with a monetary value.
03: */
04: public class Coin implements Measurable
05: {
06:    /**
07:       Constructs a coin.
08:       @param aValue the monetary value of the coin
09:       @param aName the name of the coin
10:    */
11:    public Coin(double aValue, String aName) 
12:    { 
13:       value = aValue; 
14:       name = aName;
15:    }
16: 
17:    /**
18:       Gets the coin value.
19:       @return the value
20:    */
21:    public double getValue() 
22:    {
23:       return value;
24:    }
25: 
26:    /**
27:       Gets the coin name.
28:       @return the name
29:    */
30:    public String getName() 
31:    {
32:       return name;
33:    }
34: 
35:    public double getMeasure() 
36:    {
37:       return value;
38:    }
39: 
40:    private double value;
41:    private String name;
42: }