Write an abstract super class encapsulating a vacation a


Write an abstract super class encapsulating a vacation: A vacation has two attributes: a budget and a destination. It has an abstract method returning how much the vacation is over or under budget. This class has two non-abstract subclasses: one encapsulating an all-inclusive vacation, and the other encapsulating a vacation bought piece-meal. An all-inclusive vacation has three additional attributes: a brand (for instance ClubMed); a rating, expressed as a number of stars; and a price. A piecemeal vacation has two additional attributes: a set of items (hotel, meal, airfare), and a set of corresponding costs. You also need to include a client class to test these two classes using either an ArrayList or an array of objects to populate the array, print the state of each element and the total costs for all vacations. Also include and test an abstract calculate cost method that returns the total cost of each vacation.

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Write an abstract super class encapsulating a vacation a
Reference No:- TGS0615406

Expected delivery within 24 Hours