Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**Using Java** You are writing a program for a company that manages vacations at a Hawaiian Island Resort with several hotels. It also manages the

**Using Java**

You are writing a program for a company that manages vacations at a Hawaiian Island Resort with several hotels. It also manages the tickets to special events/trips/shows around the Island for the customer purchased in advanced for their stay. The company wants to keep the data for each vacation it books all together in one place and you decide to create an object oriented class to keep the vacation data for each customer as they book it with your company.

Make the following program:

Create a VacationBooking Class. This class needs to have a Customer Name, Hotel Name, Room Number, Days Reserved, and Event Tickets as private data. They should all have public gets and sets to access the data, and private data variables to hold the data.

[Event Tickets is a double, not an integer. It is the combined price total of any special events/trips/shows the customer reserved and are being purchased in with the hotel stay at the same time.]

The set methods for the Days Reserved and Event Tickets should not allow negative numbers to be stored in the data for these class attributes. There should also be a full constructor that takes all of the data the VacationBooking has and sets its data. There should also be a showVacationPrice() method that finds the total price of the vacation. Each Day Reserved is $1000. The Vacation Price is the Days Reserved * 1000 + Event Tickets, and there is a tax rate of 5% added to this total.. The VacationBooking class is a data class. It should not have main inside it.

In a Separate Code File, create a java class to have a main() and run the program. It should create at least 2 objects of the VacationBooking class and get data from the user for the objects for the two persons booking vacations. You can either create the objects with a default constructor and change the values using the sets or create the objects with all of the data at once using the full constructor. It is up to you. Have the program show the customer name, hotel name, and vacation price for each of the 2 VacationBooking objects to the user. Then, ask the user for a change in number of days for one of the two customers and make the change in that VacationBooking. Then show the vacation price for each of the orders to the user again.

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

What is meant by the term turnaround sale?

Answered: 1 week ago

Question

How could assessment be used in an employee development program?

Answered: 1 week ago