You are working for budget airlines as a junior programmer, you and your team has given a task to develop and test a program for the company so their customers to choose as per their requirements and can check availability or can add service.
For the below create a generic output display as:
International destination | Domestic destination |
County name: | City name |
City as per the county | Car hire |
Also, as per destination selection information shall output as:
a. Create a class named International Destination to be the superclass of all the destinations. It should have suitable constructors to aid with polymorphic behaviour, and contain suitable attributes to store the information that is common to all destination names and appropriate accessors. For all destinations, the toString method should return only the country name and city of destination
b. Create a class called Domestic Destination. It should be a subclass of the class internation destination. Ensure that it contains appropriate attributes to store additional information specific to domestic destination. Ensure that there is a suitable constructor, mutators to set all values appropriately, and that there are appropriate accessors to obtain all information relevant to domestic destination. Override toString() method so that it return all the domestic destination information
c. Create a class called Car Hire and shall only represent when customer selected Domestic destination. It should be a subclass of Car hire. Ensure that it contains appropriate attributes to store additional information specific to Car hire. Ensure that there is a suitable constructor, mutators to set all values appropriately, and that there are appropriate accessors to obtain all information relevant to packaged items. Override toString() method so that it return all relevant information related to the Packaged items.
d. Create a driver class which will have main method and following functionalities.
e. Create a class diagram for above mentioned classes. Show all attributes, methods and proper relationships between classes.
Case id's: Case name: Case data: Expected outcome: Actual outcome: