Object Oriented Design and Programing: International Destination Class

Verified

Added on  2022/08/16

|6
|381
|16
Project
AI Summary
This document presents a solution for an object-oriented design and programming project, specifically focusing on an International Destination Class. The solution includes a class diagram and code implementation. The project covers key concepts like object-oriented design, class creation, and data structures. The project also explores different methods like toString and methods to display the object details. The project also provides a CarHire class containing the main method and a scanner object to take user input. The user can select between the country and city name, or city name, car hire and fare. The document also includes a bibliography with references to relevant research papers and books, enhancing the academic value of the project.
Document Page
Running head: OBJECT ORIENTED DESIGN AND PROGRAMING
OBJECT ORIENTED DESIGN AND PROGRAMING
Name of the Student
Name of the University
Author Note
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1OBJECT ORIENTED DESIGN AND PROGRAMING
International Destination Class: -
This is the international destination Class. Country name and city name is two string
variable. International is the constructor in this class. Every country name and city name is
store in this constructor. The display is the method that is able to print a country name and
city name. toString method is created in this class. It is a helpful method to display objects in
child class.
Document Page
2OBJECT ORIENTED DESIGN AND PROGRAMING
Domestic Destination Class: -
This is the Domestic class. City, car hire and fare is three variable is created.
Domestic is the constructor in this class. A domestic constructor can get every city, car hire
and fare details. toString method is created in this class. This method is able to return the city
and car hire details. Display class can print city, car hire and fare details.
CareHire Class: -
Document Page
3OBJECT ORIENTED DESIGN AND PROGRAMING
CarHire class contains the main method in this project. Scanner object is able to take
input from the user. By creating an object of international class, sending country name and
city name in the international class. Object3 is an object of the domestic class. By using this
object details of domestic destination can be stored.
A user can choose option 1 or 2. By pressing 1 they are able to view country name
and city of destinations, and by selecting 2 they can get city name, care hire status and fare
price.
Output: -
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4OBJECT ORIENTED DESIGN AND PROGRAMING
Figure 1: Class diagram for airline industry
(Source: Created by author)
Document Page
5OBJECT ORIENTED DESIGN AND PROGRAMING
Bibliography:
Elena, C., 2014, January. An approach to class diagram design. In 2014 2nd International
Conference on Model-Driven Engineering and Software Development (MODELSWARD) (pp.
448-453). IEEE.
Goodrich, M.T., Tamassia, R. and Goldwasser, M.H., 2014. Data structures and algorithms
in Java. John Wiley & Sons.
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]