. In Chapter 8, you created an Event class for Carly's Catering. Now extend the class to create a DinnerEvent class. In the extended class, include four new integer fields that represent numeric...


. In Chapter 8, you created an Event class for Carly's Catering. Now extend the class to create a DinnerEvent class. In the extended class, include four new integer fields that represent numeric choices for an entrée, two side dishes, and a dessert for each DinnerEvent object. Also include three final arrays that contain String menu options for entrées, side dishes, and desserts, and store at least three choices in each array. Create a DinnerEvent constructor that requires arguments for an event number and number of guests, and integer menu choices for one entrée, two side dishes, and one dessert. Pass the first two parameters to the Event constructor, and assign the last four parameters to the appropriate local fields. Also include a getMenu() method that builds and returns a String including the Strings for the four menu choices. Save the file asDinnerEvent.java.


b. In Chapter 9, you created an EventDemo program for Carly's Catering. The program uses an array of Event objects and allows the user to sort Events in ascending order by event number, number of guests, or event type. Now modify the program to use an array of four DinnerEvent objects. Prompt the user for all values for each object, and then allow the user to continuously sort the DinnerEvent descriptions by event number, number of guests, or event type. Save the file asDinnerEventDemo.java.


Create a zip file of the .java file(s) and submit the assignment.



Jul 27, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here