Comment Out Unnecessary code

master
Hammy 4 years ago
parent ffa4bcbdc3
commit 73f8bea0b4

@ -33,9 +33,12 @@ public class PancakeHouseMenu {
menuItems.add(new MenuItem(name, description, vegetarian, price)); menuItems.add(new MenuItem(name, description, vegetarian, price));
} }
/*
Note: Using iterator to get rid of this code
public List<MenuItem> getMenuItems() { public List<MenuItem> getMenuItems() {
return menuItems; return menuItems;
} }
*/
public Iterator createIterator() { public Iterator createIterator() {
return new PancakeHouseMenuIterator(menuItems); return new PancakeHouseMenuIterator(menuItems);

@ -34,9 +34,12 @@ public class PancakeHouseMenu {
menuItems.add(new MenuItem(name, description, vegetarian, price)); menuItems.add(new MenuItem(name, description, vegetarian, price));
} }
/*
Note: Using iterator to get rid of this code
public List<MenuItem> getMenuItems() { public List<MenuItem> getMenuItems() {
return menuItems; return menuItems;
} }
*/
public Iterator<MenuItem> createIterator() { public Iterator<MenuItem> createIterator() {
return new PancakeHouseMenuIterator(menuItems); return new PancakeHouseMenuIterator(menuItems);

Loading…
Cancel
Save