Professional Documents
Culture Documents
1
1820127
Table of Contents
Cover Page .......................................................................................................................................................... 1
Table of Contents ............................................................................................................................................... 2
Figures ................................................................................................................................................................ 3
Introduction........................................................................................................................................................ 4
Model of the program ......................................................................................................................................... 5
Implementation .................................................................................................................................................. 8
Staff Details............................................................................................................................ 10
Pilot Details ............................................................................................................................ 11
Cabin Crew Details ................................................................................................................. 11
Check the Information ........................................................................................................... 12
Flight Details Class ............................................................................................................................... 13
constructor ............................................................................................................................ 13
Flight Details Output ............................................................................................................. 14
Getter and Setter ................................................................................................................... 14
Airplane Details Class........................................................................................................................... 15
constructor ............................................................................................................................ 15
Airplane Details Output ......................................................................................................... 16
Getter and Setter ................................................................................................................... 17
Staff Details Class ................................................................................................................................ 17
constructor ............................................................................................................................ 17
Staff Details Output ............................................................................................................... 18
Pilot & Cabin Crew Details Classes ....................................................................................................... 18
Pilot Details Output ................................................................................................................ 19
Cabin Crew Details Output..................................................................................................... 19
Conclusion ........................................................................................................................................................ 20
References ........................................................................................................................................................ 21
2
1820127
Figures Table
3
1820127
Introduction
In the advancing world of knowledge, the applications are a rapidly rising segment of the global
user of this applications. Mobile applications and others programs are growing at a meteor
pace to give users a rich and fast user experience. Java is a software design language primary
released by Sun Microsystems back in 1995. It can be found on many different kinds of devices
from smart-phones, to PC computers (Bose, S., Mukherjee, M., Kundu, A. and Banerjee, M., 2018).
In this task I created an application, the program created for flight schedule system is the most
important part of an airline's planning process. I developed the flight schedule system using
java programing developer. As all of us know like this applications is best ways for airline's
resources to fulfil demand and optimize earnings.
However I wrote this java program, which describes the inheritance hierarchy of these flight
schedule system with the required classes using detailed in the rest part of this case study. The
program was with some input/output. The main information this programmer has are:
Airplane Details, which includes:
The type of plane
The model number of plane
The seating capacity of the plane
The name of pilot assigned for each aircraft
The Availability of the seating
4
1820127
5
1820127
This use case created for flight schedule system for an airline company with the required
classes detailed. There are four actors in the use case which they can use this system. First actor
is pilot, the main things the pilot can do in this system just fly the airplane and get salary.
Second actor in this system the show the cabin crew responsibly which will be give instruction,
check security, serve food for the pilots and the passengers and get salary. Third actor is admin,
the admin can access the system to manage passenger data, manage ticker availability, add or
edit staff details and update the flight schedules. The last actor in this system is passenger
which he/she can check for availability for the seats or tickets also can view the ticket then
choose the seat and finish the booking. However login function with passenger that not
available in this system but in next update of the system it will be available (Point, T).
6
1820127
Class Diagram
A Class in UML diagram may be an outline utilized to make an object or set of objects. The Class
defines what an object can do. It could be a layout to make different objects
and implement their behavior within the program. A Class in UML is symbolized by a rectangle
that includes rows with class names, attributes, and operations (Alyssa Walker 2021). This class
diagram made to help out in this program. First of all it helps to explain the kinds of objects in
the system and the different kinds of relations that exist between the objects. However in this
class diagram there are many relationship among the classes. Starting with flight details class
which has relationship with airplane details class and staff details class. That relationship is all
about the necessary information for the flight. Taking about the relationship among flight
7
1820127
details class and airplane details class first the aircraft information must be present for the
flight. Second with staff details class, the pilot and cabin crew are a staff so that means there
are a part of staff details class. Likewise the flight needs a pilot and cabin crew. As we sow the
relations between the class so important. However the class diagram improved for
understanding of overall plans of program.
Implementation
8
1820127
This for string for save this word and will use it in next step.
connectionURL = "jdbc:derby://localhost:1527/ALMO";
9
1820127
Code for connection to the database and cheek for username and password
in this SQL commend we call the table from the databases to get the data.
ResultSet rs;
Statement st = conn.createStatement();
creates a Statement object to be used for sending SQL commands to the database.
When you press in Enter if the ID and Password is correct you will move to next page.
10
1820127
From file you can chose add item and move to next page to add a new item.
11
1820127
The main page for the program you can see many buttons and text filed
One for item number, second for item description, third for item price, fourth for item stock
Java software package using information structures to stock and launch information, and Use
algorithms to control the data in those structures. In this part Figure 3: algorithm of this
12
1820127
report I will talk about about some functions with implementation that I used to make this
program.
1. Main Class
In this part of this report going to explain about the code and placing screenshots of the
running program roles, using a short explanation. First of all will start with the Main class.
In this section of the main class we called the other class. Starting with Airplane class, it called
to the main by using extends function. Then calling the other classes by declaring the classes in
the main class as it showing in above.
1.1 Main Menu
This is the main menu of flight schedule application. This application will consume a seven
selections for user to access the functionalities of the arrangement. However we be able to
13
1820127
realize in the screenshots of the running application above the main menu has the next
selections:
1. Airplane Details.
2. Flight Details
3. Staff Details
4. Pilot Details
5. Cabin Crew Details
6. Exit.
In this first choice in flight schedule program. It allows the user to enter or input all data about
aircraft that will be use in the specific flight as it shown in figure 7. In figure 8 the codes that
used in this choice and located in main class.
14
1820127
The next choice of the main menu lets the users to add the flight details such as departure,
destination, departure time, arrival time and date of the flight. All this information will be
shown for the pilot and cabin crew five days before the flight. Also program gives access for the
passengers to check all information about the flight.
In the third option of main menu allowing the user to input the data about the staff. The admin of this
program only has the access to add staff information. The admin should fill all require information about
the staff for example the name of staff, ID number, address, designation, email and salary.
15
1820127
Pilot details option created to add the all information of the pilot for the flight. This option lets
the admin to input the pilot data. As we can see in figure 13 there is the requirement
information the admin should input and this information are (first name, last name, ID number,
address, email, salary and date of joined).
Figure 16: cabin crew option Figure 17: cabin crew option codes
In the fifth option of this program will let the admin only to input the cabin crew information as
with pilot details option. As we can notes almost same information between the pilot and cabin
crew. However, the cabin crew is a part of the staff but the option created because there are
some important information must be fill like first name and last name, all that because of the
cabin crew and the pilot flight from country to other and full information should presented to
the other airport.
16
1820127
Also the last option of this menu will let the user to go back to the main meu. However, this
menu created by using if-else if statement to control the options in the menu as it showing in
figure 18.
17
1820127
Flight details class is the second class created in this program. Which is Designed and
implemented to store data about a commercial flight. The data includes the next variable as
it showing in figure 19:
Origin.
Destination.
Departure time.
Arrival time.
Date of flight.
2.1 constructor
In this part of flight details class used a
constructor which accepts some data of the
data of this class such as origin, destination
and date of flight. We used constructor with
argument for variable as "String". Also used
constructor without argument the main
purpose of using this to return the values Figure 21: constructor codes
from the main class in order.
18
1820127
Figure 22: flight details output Figure 23: flight details output codes
In this section of the flight class the most important codes figure 21 that will let the user to see
the output of flight details figure 20. By using constructor methods to return the values from
main class to this class.
Figure 22 showing the getter and setter codes which will let to control over the values. The
getter method used to return the value of the element. The setter method taking the value and
assigns it to the element.
19
1820127
Airplane details class is the third class that created for flight schedule system program. However
this class is made to store information about the aircraft. The information that must be fill by
the admin as it will cover in next points:
• Make.
• Model.
• Capacity.
• Pilot.
• Available.
First value in this class will be string which will be for the type of the model of aircraft. The
second and third values will be mode and capacity and they goanna be integer that will let the
user to enter numbers only. Fourth value in airplane details will allow the user to enter the
name of the pilot of the flight. Last value of this class for availability of the seats of the flight.
3.1 constructor
In this part of airplane details class declared a constructor which accepts the information of this
class. We used constructor with argument for variable as "String, Int and Boolean". Also used
constructor without argument the main purpose of using this to return the values from the
main class in order.
20
1820127
Figure 27: airplane details output Figure 28: airplane details output codes
As all can see this is the output of the airplane details class figure 25. Via using codes in figure
26 all data that entered in main class printed out
21
1820127
• Name.
• Staff ID.
• Address.
• Designation.
• Email.
• Salary.
As it showing in figure 28 there are string and integer objects. Thee string object used for name,
address, designation, email and salary. In other hand integer object used for staff id number
only because the id number must be numbers without letters.
4.1 constructor
Constructor used in this class to return the values from main class as mentioned. We used
constructor with argument for variable as "String and Integer". Likewise used constructor
without argument the main purpose of using this to return the values from the main class in
order.
22
1820127
Figure 33: staff details output Figure 32: staff details output codes
This part of the codes in staff details of the program will print out the full information of the
staff as is shown in figure 30. The information most information that will be shown are the
name of the staff, ID number of the staff, the address of the staff, designation, email and salary.
Figure 34: pilot details class codes Figure 35: cabin crew details class codes
The figures 32 and 33 created for pilot details class and cabin crew details class. Both of this
classes extended of staff details class. The most important information must be fill in this two
classes are first name, last name, ID, address, email, salary and date of joined.
23
1820127
Figure 36: pilot details output Figure 37: pilot details output codes
Figure 35 is made for pilot details output part in this program. Likewise we can see in figure 34
the clear screenshot of the output with full information of the pilot.
Figure 38: cabin crew details output Figure 39: cabin crew details output codes
Figure 36 is showing the output for cabin crew details by using codes in figure 37. The
information must be fill through the admin. The admin must be know the first name, last name,
ID number, address, designation, email, salary, date of joined and the description of job of the
cabin crew.
1. Testing :
24
1820127
25
1820127
Conclusion
In the end of this report will be dissertation about what I have knowledgeable from how
different OOP and from making the flight schedule system programs in this assignments. OOP
concepts in Java are the key in the Java’s Object Oriented Programming. They are an
abstraction, encapsulation, inheritance and polymorphism. In this program inheritance been
used. Inheritance is a special feature of OOP in Java. It lets program writer to build a new
classes that share a lot of the attributes of different classes ( ALTVATER, A., 2017). It was kindly hard to
know the all concepts about the program. On the other hand after learning Java in the classes
in this semester it converts to easy to understand in what method to deal with it.
26
1820127
References
Tallyfy. 2018. All You Need to Know About UML Diagrams: Types and 5+ Examples. [online] Available at:
<https://tallyfy.com/uml-diagram/> [Accessed 13 October 2021].
Bose, S., Mukherjee, M., Kundu, A. and Banerjee, M., 2018. A comparative study: java vs kotlin
programming in android application development. International Journal of Advanced Research in
Computer Science, 9(3), p.41.
27
1820127
ALTVATER, A., 2017. What Are OOP Concepts in Java? The Four Main OOP Concepts in Java, How They
Work, Examples, and More. [online] Stackify. Available at: <https://stackify.com/oops-concepts-in-java/>
[Accessed 2 November 2021].
Walker, A., 2021. UML Class Diagram Tutorial: Abstract Class with Examples. [online] Guru99. Available
at: <https://www.guru99.com/uml-class-diagram.html> [Accessed 3 November 2021].
28