Question: Problem description: You are developing a simple software for a restaurant wich aims to display a list of menu items, based on some characteristics of
Problem description: You are developing a simple software for a restaurant wich aims to display a list of menu items,
based on some characteristics of the individual menu items. You are given the following classes and interfaces:
Menultem class, Menu interface, Iterator interface. The code for these are given below.public Iterator createlterator;
public class Menultem String description;boolean halaal;double discountrate;dr this.name name; this.halaal halaal; this.price price; this.discountrate dr;public String getName return name;public String getDescription return description;public double getPrice return price;public boolean isVegetarian return vegetarian;public String toString
Draw a UML diagram for this particular case of the Iterator Design Pattern
Implement a InternationalRestaurant class and three separate iterator classes, Vegotarianlterator
HalaalMeatDishlterator and A Discountlerator that iterate over vegetarian, balaal and discounted if discount
rate is greater than menu items respectively. Implement a Cliant that tests your iterators. Your code should populate
the menu items, and should use your custom iterators in two senarate lonns to print two lists of vegetarian and balaal
items.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
