package class9_2_CurrencyFactory_inClass.currency; //concrete CurrencyMaker, a "Product" public class DollarBillMaker extends CurrencyMaker { // attributes specific to DollarBillMaker go here public DollarBillMaker() { name = "Dollar bill"; substrate = "paper"; frontImprint = "George Washington"; backImprint = "US Capitol"; } // DollarBillMaker-specific behavior public void makeCurrency() { System.out.println( "Printing the " + frontImprint + " for the " + name ) ; System.out.println( "Printing the " + backImprint + " for the " + name ) ; } @Override public String getProductName() { return "US Dollar Bill"; } }