private void printMenu(iIterator iterator) { while (iterator.hasNext()) { MenuItem menuItem = (MenuItem)iterator.next(); Console.WriteLine(menuItem.getName() + " "); Console.WriteLine(menuItem.getPrice() + " "); Console.WriteLine(menuItem.getDescription()); } }
public void SendView(iIterator it) { Human human = it.next() as Human; if (human != null) { Console.WriteLine(human.GetType().Name); Console.WriteLine(Environment.NewLine); Console.WriteLine(human.ToString()); } }