MCPcopy Create free account
hub / github.com/Anchals24/Low-Level-Design / Pizza

Class Pizza

AbstractFactoryPattern/Pizza.java:8–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import CreationalDesignPattern.FactoryPattern.AbstractFactoryPattern.Sauce.Sauce;
7
8public abstract class Pizza {
9 String name;
10 Dough dough;
11 Sauce sauce;
12 Cheese cheese;
13 Pepperoni pepperoni;
14
15 abstract void prepare();
16
17 void bake(){
18 System.out.println("Bake for 25 minutes");
19 }
20
21 void cut(){
22 System.out.println("Cutting the pizza into diagonal slices.");
23 }
24
25 void pack(){
26 System.out.println("Pizza is ready now. Packing it!");
27 }
28
29 void setName(String name){
30 this.name = name;
31 }
32
33 String getName(){
34 return name;
35 }
36}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected