Case problem 1 carlys catering provides meals for parties


Question: Case Problem #1 Carly's Catering provides meals for parties and special events. In Chapters 3 and 4, you created an Event class for the company. Now, make the following changes to the class:

- Currently, the class contains a field that holds the price for an Event. Now add another field that holds the price per guest, and add a public method to return its value.

- Currently, the class contains a constant for the price per guest. Replace that field with two fields-a lower price per guest that is $32, and a higher price per guest that is $35.

- Add a new method named isLargeEvent() that returns true if the number of guests is 50 or greater and otherwise returns false.

- Modify the method that sets the number of guests so that a large Event (over 50 guests) uses the lower price per guest to set the new pricePerGuest field and calculate the total Event price. A small Event uses the higher price.

- Save the file as Event.java

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Case problem 1 carlys catering provides meals for parties
Reference No:- TGS02343291

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)