Menu

[Solved]Create List Ten Items Represent Things Ordered Restaurant Design Subclasses Menultem Displ Q37180125

need it done soon! please help
You will create a List of ten items to represent things ordered from a restaurant. You will design subclasses of Menultem tha
MUST be done using lambda expressions!
javaYou will create a List of ten items to represent things ordered from a restaurant. You will design subclasses of Menultem that are Displayable, and which have a void display) method. Subclasses have an itemName instance variable and some also have a promptMessage o o The display) method outputs the itemName o For a Choosableltem, display() also prompts for a further choice, such as a flavor For simplicity, our application will just display items in the list, and, if they are instances Choosoeblitem, will display an additional prompt. (We won’t actually input the response to a prompt.) Example: You ordered: Froyo. Choose: Vanilla, Chocolate? You ordered: Cookie Dough slice. Etc. ?Here is the important part of this assignment: Each subclass must have one instance variable that must be a lambda expression that the display() method will invoke HINT: use a correct functional interface in each subclass!! (This part is the main objective of the assignment!!) Your test application [i.e, main)] will create an ArrayList of Menultem subclass objects which would have been generated by some process that occurred before our application starts. Iterate through the List using polymorphic calls to display Show transcribed image text You will create a List of ten items to represent things ordered from a restaurant. You will design subclasses of Menultem that are Displayable, and which have a void display) method. Subclasses have an itemName instance variable and some also have a promptMessage o o The display) method outputs the itemName o For a Choosableltem, display() also prompts for a further choice, such as a flavor For simplicity, our application will just display items in the list, and, if they are instances Choosoeblitem, will display an additional prompt. (We won’t actually input the response to a prompt.) Example: You ordered: Froyo. Choose: Vanilla, Chocolate? You ordered: Cookie Dough slice. Etc. ?Here is the important part of this assignment: Each subclass must have one instance variable that must be a lambda expression that the display() method will invoke HINT: use a correct functional interface in each subclass!! (This part is the main objective of the assignment!!) Your test application [i.e, main)] will create an ArrayList of Menultem subclass objects which would have been generated by some process that occurred before our application starts. Iterate through the List using polymorphic calls to display

Expert Answer


Answer to You will create a List of ten items to represent things ordered from a restaurant. You will design subclasses of Menulte… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *