Directione: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA Notes Assume that the classes listed in the Java Quick Reference have been imported where appropriate Unless otherwise noted in the question assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question writing significant amounts of code that can be replaced by a call to one of these methods will not receive full credit Submit 3. This question involves food items on a restaurant menu Menu items are represented by the following Food class. public class Food /** Returns the category of the food item (for example, "Entree""Appetizer", or "Dessert") . public String getCategory ( Implementation not shown /> /* Returns true if the food item is recommended as child-friendly and returns false otherwise public boolean Ischildfriendly { implementation not shown) There may be instance variables, constructors, and methods that are not shown 3 A restaurant's menu is represented by a Menu object, which contains a list of all food items on the menu. You will write two methods of the Menu class. public class Menu /* The list of food items on the menu Guaranteed not to be null and to contain only non-null entries private ArrayList
/* Returns true if the food item is recommended as child-friendly and returns false otherwise public boolean Ischildfriendly { implementation not shown) There may be instance variables, constructors, and methods that are not shown 3 A restaurant's menu is represented by a Menu object, which contains a list of all food items on the menu. You will write two methods of the Menu class. public class Menu /* The list of food items on the menu Guaranteed not to be null and to contain only non-null entries private ArrayList