Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming edition 8, Chapter 4 case problem p.243-244 1a-b Carlys Project build from original. 1a. carlys catering provides meals for parties and special events.

Java Programming edition 8, Chapter 4 case problem p.243-244 1a-b Carlys Project build from original. 1a. carlys catering provides meals for parties and special events. In Chapter 3, you created an Event class for the company. The Event class contains two public final static fields that hold tghe price per guest ($35.00) and the cutoff value for a large event (50 guests), and three private fields that hold an event number, number of guests for the event, and the price. It also contains two public set methods and three public get methods. Now modify the Event class to contain two overloaded constructors. Once constructor accepts an event number and number of guests as parameters. Pass these values to the setEventNumber() and setGuests() methods, respectively. The setGuests() method will automatically calculate the event price. The other constructor is a default constructor that passes "A000" and 0 to the two-parameter constructor. Save the file as Event.java. 1b. In chapter 3, you also created an EventDemo class to demonstrate using two Event objects. Now modify that class to instantiate two Event objects, and include the following new methods in the class: Instantiate one object to retain the constructor default values. Accept user data for the event number and guest fields, and use this data set to instantiate the second object. Display all the details for both objects. Save file as EventDemo.java.

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

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

Explain how Sample function works in R.

Answered: 1 week ago

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago