Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Case problem: Create an application for Carlys Catering. Employee class: this class contains data fields for an employees ID, last name, first name, pay rate,

Case problem:

Create an application for Carlys Catering.

Employee class: this class contains data fields for an employees ID, last name, first name, pay rate, and job title. The class contains get and set methods for each fields. The set methods for pay rate and job title are abstract.

Create there classes that extend Employee class named Waitstaff, Bartender, and Coordinator. The method that sets the pay rate in each class accepts a parameter and assigns it to the pau rate, but no Waitstaff can have a rate higher than 15.00, no Bartender can have a rate higher than 18.00, and no Coordinator can have a rate higher than 20.00. The method that sets the job title accepts no parameters, it simply assigns the string waitstaff, bartender, or coordinator to the object appropriately. Save the three files.

Create a DinnerEvent class to represent a dinner event. The class contains an integer field representing event type, a string field representing event name (such as wedding, birthday, corporate, and others, and another integer field representing the number of guests for the event. The class also have four integer fields that represent numeric choices for an entre, two side dishes, and a dessert for each DinnerEvent object. Also include three final arrays that contains String menu options for entrees, side dishes, and desserts, and store at least three choices in each array. The class also includes an Employee array of 15 Employee objects representing employees who might be assigned to work a DinnerEvent. The constructor requires arguments for an event number, event name and number of guests, and integer menu choices for one entre, two side dishes, and one desert. Using the arguments to initialize data fields properly. Include a get and set methods for each data fields.

Write an application that declares a DinnerEvent object, prompts the user for an event number, event name, number of guests, menu options, and contact phone number, and then assign them to the object. Also prompt the user to enter data for as many employees as needed based on the number of guests. A DinnerEvent needs one Waitstaff employee for every event, two if an event has 10 guests or more, there if an event has 20 guests or more, and so on. A DinnerEvent also needs one Bartender for every 25 guests and more Coordinator no matter how many guests attend. All of these employees should be stored in the Employee array in the DinnerEvent object.

After all data values are entered, display all of the details for the event, including all the details about the employees assigned to work.

Requirements:

1. UML diagram

2. programs should be well-documented

3. upload the source code

Notes:

1. For event name, you can define an enumerated data type that contains all available event names. Then in the constructor of DinnerEvent class, assign a proper value from the enumerated data type to the event name based on the numeric event type entered.

2. For menu options, you can also use enumerated data types instead of three final arrays

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

Students also viewed these Databases questions

Question

List and describe the steps of mediation.

Answered: 1 week ago

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago