Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a . In previous chapters, you developed classes that work with catering event information for Yummy Catering. Now modify the Event class to include an

a. In previous chapters, you developed classes that work with catering event information for Yummy Catering. Now modify the Event class to include an integer field that holds an event type. Add a final String array that holds names of the types of events that Yummy caterswedding, baptism, birthday, corporate, and other. Include get and set methods for the integer event type field. If the argument passed to the method that sets the event type is larger than the size of the array of String event types, then set the integer to the element number occupied by other. Include a get method that returns an event's String event type based on the numeric event type. Save the file as Event.java.
b. Create an EventDemo class that uses an array of eight Event objects. Get data for each of the objects, including an integer for the event type. Prompt the user to choose an option to sort Events in ascending order by event number, number of guests, or event type. Display the sorted list of Events, including Event number, number of guests, price per guest, total price, phone number, Event type number, and Event type String. Continue to prompt the user for sorting options and display the requested lists until the user enters a sentinel value. Save the file as EventDemo.java.
Create a zip file of the .java file(s) and submit the assignment.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

Describe the six distribution channels. Give an example of each.

Answered: 1 week ago

Question

9. Mohawk Industries Inc.

Answered: 1 week ago

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago