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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Determine the roles of spatial layout and functionality.

Answered: 1 week ago