Question 1

Design a class named Person with fields for holding a person’s name, phone number and email address. Write one or more constructors and the appropriate mutator and accessor methods for the class’ fields.

Next, design a class for a hotel system named Guest which extends the Person class. The Guest class should have fields for Room #, number of nights, and nightly rate. Write one or more constructors and the appropriate mutator and accessor methods for the class fields. Demonstrate an object of the Guest class in a simple program that accepts data for the six fields and displays them on the screen.

Document your code, including your name and program’s purpose. Zip your NetBeans project and upload the file here. Note that you have three hours to complete both questions from the time you open the exam. Upload as much as you have completed, even if it isn’t finished.

Question 2

Create a GUI application that calculates the total fees for a holiday tour package. The basic travel cost is $1299 per person, sharing a double room (the default), or $1699 for a single room. An upgrade to first class costs $1000. In addition, clients can choose one or more of the optional day tours as follows:

Shopping tour, $95
Cultural tour, $125
Boating excursion, $225
Mountain trekking, $395

Your application should allow the client to select their room type, optional upgrade to first class, and any of the day tours. A “Tour Total” button should display the total cost of items selected. You may use NetBeans’ GUI Builder to complete this application, if you wish. Document your code, including your name and program’s purpose. Zip your NetBeans project and upload the file here. Note that you have three hours to complete both questions from the time you open the exam. Upload as much as you have completed, even if it isn’t finished.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.