1//CodeHS AP Computer Science A Java, 9.5.6: Pies
2//DO NOT COPY AND PASTE, YOUR TEACHER CAN SEE YOUR EDIT HISTORY.
3
4//PieTester.java
5
6import java.util.ArrayList;
7
8public class PieTester
9{
10 public static void main(String[] args)
11 {
12 ArrayList<Pie> pies = new ArrayList<Pie>();
13 Pie applPie = new ApplePie(7);
14 Pie pumpPie = new PumpkinPie(7, true);
15 Pie pie = new Pie("blueberry", 7);
16
17 pies.add(applPie);
18 pies.add(pumpPie);
19 pies.add(pie);
20
21 for(int i = 0; i < pies.size(); i++){
22 System.out.print("Pie: ");
23 System.out.println(pies.get(i).getType());
24 }
25 }
26}
27