Examples of ChicagoPizzaFactory


Examples of com.hotmoka.examples.patterns.factory.chainstores.chicago.ChicagoPizzaFactory

  public static void main(String[] args) {
    NYPizzaFactory nyStrategy = new NYPizzaFactory();
    PizzaChainStore alPacino = new PizzaChainStore(nyStrategy);
    Pizza cheese1 = alPacino.orderPizza("cheese");

    ChicagoPizzaFactory chicagoStrategy = new ChicagoPizzaFactory();
    PizzaChainStore venezia = new PizzaChainStore(chicagoStrategy);
    Pizza cheese2 = venezia.orderPizza("cheese");

    System.out.println("This is what you eat in NY when you order a cheese pizza:");
    System.out.println(cheese1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.