codehs java 9 5 6

Solutions on MaxInterview for codehs java 9 5 6 by the best coders in the world

showing results for - "codehs java 9 5 6"
Leonie
09 Jan 2018
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
queries leading to this page
codehs java 9 2 6codehs java 9 5 6