package class9_2_CurrencyFactory_inClass.currency; //concrete CurrencyMaker, a "Product" public class DollarCoinMaker extends CurrencyMaker { // attributes specific to DollarCoinMaker go here public DollarCoinMaker() { super(); name = "Dollar coin"; substrate = "silver"; frontImprint = "Sacagawea"; backImprint = "Wolf"; } // DollarCoinMaker-specific behavior public void makeCurrency() { System.out.println( "Stamping the " + frontImprint + " for the " + name ) ; System.out.println( "Stamping the " + backImprint + " for the " + name ) ; } @Override public String getProductName() { return "US Dollar Coin"; } }