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 discount_rate;dr) this.name = name; this.halaal = halaal; this.price = price; this.discount_rate = 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, 1- Vegotarianlterator 2-
HalaalMeatDishlterator and 3- A Discountlerator that iterate over vegetarian, balaal and discounted (if discount
rate is greater than 0) 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.
Problem description: You are developing a simple

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!