Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java This assignment is to ask you to create an application for a travel agency so a n agent can book travel for a

Using Java

This assignment is to ask you to create an application for a travel agency so a n agent can book travel for a customer. The application should have the following classes:

Flight with attributes airlines of type String, flight number as int, and flight fare of type double. The class should provide a set and a get method for each of the three attributes, a non-argument constructor, a full constructor, and an overriden toString method.

Hotel with attributes hotel name of type String, days stayed as int, and daily lodging fee of type double. The class should provide a set and a get method for each of the three attributes, a non-argument constructor, a full constructor, an overriden toString, and a method that returns total lodging fee (days stayed * daily lodging fee).

Reservation with attributes customer name of type String, flight of type Flight, and room of type Hotel. The class should provide a set and a get method for each of the three attributes, a non-argument constructor, a full constructor, an overriden toString, and a method that returns reservation total(flight price plus hotel totel).

TravelAgent with only one main method. The main method will ask customer name and create a Reservation for the customer. You may ask user to enter flight info and hotel info, or you may hard code them. The program should print the reservation details for the user.

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 Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago