package org.xander.behavioral.iterator;

import java.util.*;
import java.util.Iterator;

public class PancakeHouseMenu implements Menu {
    ArrayList menuItems;

    public PancakeHouseMenu() {
        menuItems = new ArrayList();

        addItem("K&B's Pancake Breakfast",
                "Pancakes with scrambled eggs, and toast",
                true,
                2.99);

        addItem("Regular Pancake breakfast",
                "Pancakes with fried eggs, sausage",
                false,
                2.99);

        addItem("Blueberry Pancakes",
                "Pancakes made with fresh blueberries",
                true,
                3.49);

        addItem("Waffles",
                "Waffles, with your choice of blueberries or strawberries",
                true,
                3.59);
    }

    public void addItem(String name, String description, boolean vegetarian, double price) {
        MenuItem menuItem = new MenuItem(name, description, vegetarian, price);
        menuItems.add(menuItem);
    }

    public Iterator createIterator() {
        return menuItems.iterator();
    }
}



@@ -57,35 +57,8 @@
 l.*;
-%0Aimport java.util.Iterator;
 %0A%0Apu
@@ -116,16 +116,26 @@
 rrayList
+%3CMenuItem%3E
  menuIte
@@ -204,16 +204,18 @@
 rrayList
+%3C%3E
 ();%0A%0A   
@@ -1031,16 +1031,26 @@
 Iterator
+%3CMenuItem%3E
  createI

Update PancakeHouseMenu.java