Starting from:

$25

DinnerEvent class for Carly’s Catering

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 as DinnerEvent.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 as DinnerEventDemo.java.

Criteria:

Include four new integer fields that represent numeric choices for One entrée,

Two side dishes

One dessert for each DinnerEvent object.

Also include

Three final arrays that contain String menu options for entrées, side dishes, and desserts,

Store at least three choices in each array.

Create a DinnerEvent constructor that requires arguments for

An event numbernumber

Number of guests,

And integer menu choices for

one entrée

two side dishes

one dessert.

Pass the first two parameters to the Event constructor, and assign the last four parameters to the appropriate local fields.

include a getMenu() method that builds and returns a String including the Strings for the four menu choices.

ncluded DinnerEventDemo.java source file to prove that your DinnerEvent class functions properly

Save the file as DinnerEvent.java.

Notes:

1. DinnerEvent.java should just be a few dozen lines of code

2. This assignment is as much an integration of existing code as it is writing new code. You will need to read and understand all of the sources provided.

More products