-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPizza.java
More file actions
44 lines (36 loc) · 913 Bytes
/
Pizza.java
File metadata and controls
44 lines (36 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package factory;
import java.util.ArrayList;
public abstract class Pizza {
String name;
String dough;
String sauce;
@SuppressWarnings("rawtypes")
ArrayList toppings=new ArrayList();
Pizza(){
}
void prepare() {
// TODO Auto-generated method stub
System.out.println("Preparing "+name);
System.out.println("Tossing dough...");
System.out.println("Adding sauce...");
System.out.println("Adding toppings:");
for(int i=0;i<toppings.size();i++){
System.out.println(" "+toppings.get(i));
}
}
void bake() {
// TODO Auto-generated method stub
System.out.println("Bake for 25 minutes at 350");
}
void box() {
// TODO Auto-generated method stub
System.out.println("Place pizza in offical PizzaStore box");
}
void cut() {
// TODO Auto-generated method stub
System.out.println("Cutting the pizza into diagonal slices");
}
public String getName(){
return name;
}
}