Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started