Question: Java: Please help with the following assignment. Thank you. Build an application that handles setting up vacation plans. Create an abstract superclass called Vacation Instance
Java: Please help with the following assignment. Thank you.
- Build an application that handles setting up vacation plans.
- Create an abstract superclass called Vacation
- Instance Variables
- destination - String
- budget - double
- Constructors - default and parameterized to set all instance variables
- Access and mutator methods
- budgetBalance method - abstract method that returns the amount the vacation is under or over budget. Under budget is a positive number and over budget is a negative number.
- Instance Variables
- Create a concrete class called AllInclusive that is a subclass of Vacation and represents an all inclusive vacation like Sandals or Club Med.
- Instance Variables
- brand - String, such as Sandals , Club Med etc
- rating - int, representing number of stars such as 5 star rating.
- price - double, the total cost of the vacation
- Constructor - default and parameterized to set all instance variables
- Accessor and mutator methods
- Overwritten budgetBalance method.
- Instance Variables
- Create a concrete class called ALaCarte that is a subclass of Vacation and represents a vacation that requires payment for each activity separately
- Instance Variables
-
- hotelName - String
- roomCost - double
- airline - String
- airfare - double
- meals - double - estimated total meal expenses.
- Constructor - default and parameterized to set all instance variables
- Accessor and mutator methods
- Overwritten budgetBalance method.
- Create a VacationTester class
- Test all methods.
- Polymorphically call the budgetBalance method by creating at least 2 object of each Vacation subclass, and place those object in a collection of the Vacation object.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
