You will now add to your program, other vacation items. We will add travel by airplane, renting a car and adding a luxury hotel option. This will all be accomplished by using inheritance....

1 answer below »

You will now add to your program, other vacation items. We will add travel by airplane, renting a car and adding a luxury hotel option. This will all be accomplished by using inheritance.



Requirements:


Use the LuxuryHotel.java file and add it to your hotelPackage. The instance variables and constructor was already created for you. Create setters and getters for the instance variables. Create methods to calculate costs of the following services: dry cleaning and spa cost. Dry cleaning is done by the rate * the number clothes and the spa is calculated by the rate * hours.


Implement the Rentable interface. When implementing, add any necessary methods to calculate rental cost. Use the rentalCarPackage


Extend the Airline abstract class. Use the class built as a basis and add any necessary methods to complete a reservation for an airline trip. Use the airlinePackage for the class.


Update the Menu class as needed to accommodate these new options.


Run the program and add four guests (You make up the guest details and info for flight, car, hotel, etc). Modify the program to print to a file instead of a console. Like a manifest, showing the guest, their destination, their flight info, the hotel, and car rental info. You will modify the existing classes to print to a file. Remember to use exceptions to ensure the program does not crash when printing to a file.



Submission:


Submit all the .java files.Do not zip them. Submit each individual file. Submit the text file containing the travel manifest.



Attachments:

Answered Same DayNov 13, 2021

Answer To: You will now add to your program, other vacation items. We will add travel by airplane, renting a...

Mohd answered on Nov 22 2021
149 Votes
Solution/Luxury Hotel/.classpath

    
    
    
Solution/Luxury Hotel/.project

     Luxury Hotel
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
            
            
        
    
    
         org.eclipse.jdt.core.javanature
    
Solution/Luxury Hotel/bin/airlinePackage/Airline.class
package airlinePackage;
public abstract synchronized class Airline {
private String slogan;
private int[][] seat;
private String destination;
private String name;
public void Airline(String, String);
public void setDestination(String);
public abstract void assignSeat();
}
Solution/Luxury Hotel/bin/guestPackage/Guest.class
package guestPackage;
public synchronized class Guest {
private String name;
private String address;
private String phoneNumber;
private int numberOfDays;
public void Guest();
public void Guest(String, String, String, int);
public String getName();
public void setName(String);
public String getAddress();
public void setAddress(String);
public String getPhoneNumber();
public void setPhoneNumber(String);
public int getNumberOfDays();
public void setNumberOfDays(int);
}
Solution/Luxury Hotel/bin/hotelPackage/Hotel.class
package hotelPackage;
public synchronized class Hotel {
private String hotelName;
private int numOfRooms;
guestPackage.Guest[] guests;
public void Hotel(int);
public void Hotel(String, int);
public void setHotelName(String);
public void setNumOfRooms(int);
public String getHotelName();
public int getNumOfRooms();
public String toString();
}
Solution/Luxury Hotel/bin/hotelPackage/LuxuryHotel.class
package hotelPackage;
public synchronized class LuxuryHotel extends Hotel {
private double dryCleaningRate;
private double spaRate;
private int piecesOfClothes;
private int hours;
public void LuxuryHotel(String, int, double, double);
public double getDryCleaningRate();
public void setDryCleaningRate(double);
public double getSpaRate();
public void setSpaRate(double);
public int getPiecesOfClothes();
public void setPiecesOfClothes(int);
public int getHours();
public void setHours(int);
public double dryCLeaningCost();
public double spaCost();
}
Solution/Luxury Hotel/bin/Main.class
public synchronized class Main {
static java.util.Scanner input;
static void ();
public void Main();
public static void main();
public static void addAirplane();
public static void rentalCar();
public static void luxuryHotel();
public static void displayDetails();
}
Solution/Luxury Hotel/bin/rentalCarPackage/Rentable.class
package rentalCarPackage;
public abstract interface Rentable {
public abstract void setCarType();
public abstract void setRentalCarCompanyName();
public abstract void setRentalRate();
}
Solution/Luxury Hotel/src/airlinePackage/Airline.java
Solution/Luxury...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here