-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPizzaTester.java
More file actions
28 lines (23 loc) · 970 Bytes
/
PizzaTester.java
File metadata and controls
28 lines (23 loc) · 970 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
import java.util.Arrays;
public class PizzaTester {
// Entry Point Method
public static void main(String[] args) {
// Pizza myPizza = new Pizza();
// myPizza.type = "Pepperoni";
String[] toppings = { "cheese", "pepperoni" };
// myPizza.toppings = toppings;
// myPizza.size = "Large";
// myPizza.slices = 12;
// System.out.printf("This is a %s pizza with %d slices\n", myPizza.type,
// myPizza.slices);
Pizza myPizza = new Pizza("Pepperoni", toppings, "L", 12);
System.out.println(myPizza.displayPizza());
myPizza.eatSlice(2);
System.out.println(myPizza.getSlices());
Pizza meatLovers = new Pizza("Meat Lovers", new String[] { "Pepperoni", "Sasuage", "steak", "Venison" }, "XL", 12);
meatLovers.pizzaFight(myPizza);
System.out.println(myPizza.getSlices());
Pizza vegetarian = new Pizza("Vegetarian", new String[] { "spinach", "onion", "bell pepper", "pineapple" });
vegetarian.eatSlice();
}
}