Form a subclass Quarter from the class Coin. A quarter has a state theme.

The getDescription method should yield a string such as

Quarter, value=0.25, state=California

Complete the following file:

Quarter.java

/** A quarter with a state theme. */ public class Quarter extends Coin { // your work here /** Constructs a quarter. @param aValue the monetary value of the quarter. @param aName the name of the quarter */ public Quarter(String aState) { // your work here } public String getDescription() { // your work here } }

Use the following files:

Coin.java

/**
   A coin with a monetary value.
*/
public class Coin
{
   private double value;
   private String name;

   /**
      Constructs a coin.
      @param aValue the monetary value of the coin.
      @param aName the name of the coin
   */
   public Coin(double aValue, String aName) 
   { 
      value = aValue; 
      name = aName;
   }

   /**
      Gets the coin value.
      @return the value
   */
   public double getValue() 
   {
      return value;
   }

   /**
      Gets the coin description.
      @return a description of this coin
   */
   public String getDescription() 
   {
      return name + ", value=" + value;
   }
}

QuarterTester.java

public class QuarterTester
{
   public static void main(String[] args)
   {
      Coin c = new Quarter("Michigan");
      System.out.println(c.getDescription());
      System.out.println("Expected: Quarter, value=0.25, state=Michigan");
   }
}