Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

  1. Build an application that handles setting up vacation plans.
  2. Create an abstract superclass called Vacation
    1. Instance Variables
      1. destination - String
      2. budget - double
    2. Constructors - default and parameterized to set all instance variables
    3. Access and mutator methods
    4. 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.
  3. Create a concrete class called AllInclusive that is a subclass of Vacation and represents an all inclusive vacation like Sandals or Club Med.
    1. Instance Variables
      1. brand - String, such as Sandals , Club Med etc
      2. rating - int, representing number of stars such as 5 star rating.
      3. price - double, the total cost of the vacation
    2. Constructor - default and parameterized to set all instance variables
    3. Accessor and mutator methods
    4. Overwritten budgetBalance method.
  4. Create a concrete class called ALaCarte that is a subclass of Vacation and represents a vacation that requires payment for each activity separately
    1. Instance Variables
      1. hotelName - String
      2. roomCost - double
      3. airline - String
      4. airfare - double
      5. meals - double - estimated total meal expenses.
    1. Constructor - default and parameterized to set all instance variables
    2. Accessor and mutator methods
    3. Overwritten budgetBalance method.
  5. Create a VacationTester class
    1. Test all methods.
    2. 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

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

2. Someone born in the same state you were

Answered: 1 week ago