logo

Flight Booking System: A Java-Based Desktop Application

   

Added on  2024-05-29

66 Pages5840 Words368 Views
 | 
 | 
 | 
Programming Java
Flight Booking System: A Java-Based Desktop Application_1

Table of Contents
List of Figures..........................................................................................................................................2
List of Tables...........................................................................................................................................4
Introduction..............................................................................................................................................5
Task 1 - Introduction to Java...................................................................................................................6
(a) Write a report explaining principles, characteristics and features of programming in Java....6
(b) Critically evaluate the environment flexibility of programming in java.................................7
Task 2 - Analysis and Design..................................................................................................................9
(a) System requirements:...............................................................................................................9
(b) Test plan:................................................................................................................................13
Task 3 - Implementation using java.......................................................................................................20
(c) System implementation..........................................................................................................20
(d) Relationship between objects.................................................................................................26
(e) Object.....................................................................................................................................27
(f) Interface of class........................................................................................................................48
(g) Onscreen help........................................................................................................................50
Task 4 - Documentation.........................................................................................................................51
(a) Testing...................................................................................................................................51
(b) Test result analysis.................................................................................................................52
(c) Feedback and recommendations............................................................................................54
(d) User documentation...............................................................................................................55
(e) Technical/Program Documentation.......................................................................................59
Conclusion.............................................................................................................................................65
References..............................................................................................................................................66
1
Flight Booking System: A Java-Based Desktop Application_2

List of Figures
Figure 1 Use Case Diagram...................................................................................................................10
Figure 2 Class Diagram.........................................................................................................................12
Figure 3 Test plan 1...............................................................................................................................14
Figure 4 Test plan 2...............................................................................................................................15
Figure 5 Test plan 3...............................................................................................................................16
Figure 6 Test plan 4...............................................................................................................................17
Figure 7 Test plan 5...............................................................................................................................17
Figure 8 Activity Diagram.....................................................................................................................18
Figure 9 Main menu...............................................................................................................................20
Figure 10 System services.....................................................................................................................20
Figure 11 Flight menu............................................................................................................................21
Figure 12 Add flight..............................................................................................................................22
Figure 13 Search flight..........................................................................................................................23
Figure 14 Search flight results...............................................................................................................24
Figure 15 Booking details......................................................................................................................25
Figure 16 Fetch list of passengers..........................................................................................................25
Figure 17 List of passengers..................................................................................................................26
Figure 18 Code to add flight (part 1).....................................................................................................28
Figure 19 Code to add flight (part 2).....................................................................................................29
Figure 20 Code to add passenger (Part 1)..............................................................................................30
Figure 21 Code to add passenger (Part 2)..............................................................................................31
Figure 22 Code to book tickets (Part 1).................................................................................................32
Figure 23 Code to book tickets (Part 2).................................................................................................33
Figure 24 Code to book tickets (Part 3).................................................................................................34
Figure 25 To fetch passenger details (part 1)........................................................................................35
Figure 26 To fetch passenger details (Part 2)........................................................................................36
Figure 27 To manage flight (Part 1)......................................................................................................37
Figure 28 To manage flight (Part 2)......................................................................................................38
Figure 29 To manage passenger (Part 1)...............................................................................................39
Figure 30 To manage passenger (part 2)...............................................................................................40
Figure 31 To search a flight (Part 1)......................................................................................................41
Figure 32 Code to search a flight (part 2)..............................................................................................42
Figure 30 Code to search a flight (Part 3)..............................................................................................43
Figure 34 Code to search a passenger (Part 1).......................................................................................44
Figure 35 Code to search a passenger (Part 2).......................................................................................45
Figure 36 Code to search a passenger (Part 3).......................................................................................46
Figure 37 Menu class.............................................................................................................................47
Figure 38 Menu page.............................................................................................................................48
Figure 39 service page...........................................................................................................................48
Figure 40 Booking page.........................................................................................................................49
Figure 41 Incorrect entered details........................................................................................................50
Figure 42 Test result 1...........................................................................................................................52
Figure 43 Test result 2...........................................................................................................................53
Figure 44 Test result 3...........................................................................................................................54
Figure 45 Add a flight............................................................................................................................55
2
Flight Booking System: A Java-Based Desktop Application_3

Figure 46 Add passenger.......................................................................................................................56
Figure 47 Book a ticket..........................................................................................................................56
Figure 48 Options for managing flight..................................................................................................57
Figure 49 List of passengers..................................................................................................................57
Figure 50 Main Menu............................................................................................................................58
Figure 51 Search a flight........................................................................................................................58
Figure 52 Search a passenger.................................................................................................................59
Figure 53 Google search engine............................................................................................................60
Figure 54 Open link...............................................................................................................................60
Figure 55 Download from the link........................................................................................................61
Figure 56 Automatic download.............................................................................................................61
Figure 57 Install.....................................................................................................................................62
Figure 58 Click next..............................................................................................................................63
Figure 59 Agree terms and conditions...................................................................................................64
List of Tables
Table 1 data type table.............................................................................................................................7
Table 2 Test Plan...................................................................................................................................12
Table 3 Feedback...................................................................................................................................52
3
Flight Booking System: A Java-Based Desktop Application_4

Introduction
The project is done using the programming language java. The project implemented is a scenario
based. We have implemented Flight booking system. This is a desktop based application developed
on the platform NetBeans. The system allows admin to use services like booking a seat, adding or
searching a flight, adding or searching a passenger and list of passengers travelling in a particular
flight. The evidence of this is attached to this report. The graphical user interface is very easy. The
admin doesn't need to be a technical person to use the application.
4
Flight Booking System: A Java-Based Desktop Application_5

Task 1 - Introduction to Java
(a) Write a report explaining principles, characteristics and features of
programming in Java.
The language is used as a high level is java programming language in which high level provides
comprehensible formatted structures for developing a program whereas another language is low
level provides instruction in machine term but can’t be determined by humans. According to
humans, a language is used for easily understandable and recognisable is Java for programming
orders (Shaykhian & G.A., 2007).
Some characteristics of Java as:
Object Oriented Programming: the OOPs programming provides classes & objects and its
features which help to the developer for utilizing existing class by importing and can make a
bundle as a package or many more discussed below.
OOPs, features described below as:
Encapsulation: It is used in programming provided by object oriented for forming a module or
bundle which encapsulated source code and information of class to prevent from unauthorized
access or not providing code to outsiders (Roth & A., 2005).
Inheritance: It is another feature of OOPs which is utilized for inheriting class or its methods,
attributes using access modifier which plays a vital role in classes as the base class is inherited by
a derived class, for example, children inherit the properties of a parent, similarly inheritance work
like this. Basically, inheritance provides expanding classes for their use.
Polymorphism: It is also a property of OOPs as its name implies many forms which mean single
function many uses. Polymorphism concept is utilized for defining a single function in the
program and call many times by just changing its parameters i.e., one function can be utilized in
many forms (A. & Milanova, 2004).
Distributed: Java is Distributed Language it means in light of the fact that the program of java is
incorporated into one machine can be effortlessly exchanged to the machine and executes them on
another machine as it consists properties of Bytes Codes. So java is specially intended For
Internet Users which utilizes the Remote Computers for running their developed programs on the
nearby machine in the wake of exchanging the programs from Remote Computers or either from
the web.
Robust: Java is Robust in light of the fact that it is profoundly upheld language. It is compact
crosswise over numerous Operating systems. Java additionally has the highlight of Automatic
memory management and provides garbage value collection. Solid compose checking tools of
Java likewise helps in making Java Robust. Bugs, particularly framework smashing bugs, are
exceptionally uncommon in Java (Stelting & S., 2005).
Portability: It provides a program to run or execute on various platforms as different operating
systems such as Linux, Windows or Macintosh and doesn’t generate any problems or errors while
compiling.
Multithreaded and Interactive: Java utilizes Multithreaded Techniques for execution implies as
similar to other in structure languages program is partitioned into the small parts. Like these code
of java is separated into the littler parts those are executed by java in arrangement and timing way,
known as Multithreaded. In this program of java is isolated into the little parts those are executed
by a compiler of java itself Java is called as intelligent in light of the fact that code of java bolsters
additionally CUI and furthermore GUI programs (Jia & X., 2001).
5
Flight Booking System: A Java-Based Desktop Application_6

Data types:
Table 1 data type table
Type Description Size
Byte Integer in twos 8 bits
Char Characters 16 bits
Int Integer value 32 bits
Float Floating values like 0.0 32 bits
Double Double precision float values 64 bits
Bool True or false value 1 bit
Language features:
Comments: in java, comments are passed within these identations /*………*/.
Loops: loops are used for providing conditions to execute statement within given condition
and in java, loops are similar to any language loops such as while, for, do_while.
Conditional statements: In java, Conditional statements are same to any programming
language Conditional statements such as they are if-else, nested if-else, break, continue and
more.
Logical operators: these operators are used for arithmetic calculations such as And, OR, Not.
Input and output statements: These are the part of language syntax as in java for output
statement- System.out.print(“message”) is used and for input statement steps are as:
1. import java.util.Scanner;
2. class ScannerTest{
3. public static void main(String args[]){
4. Scanner sc=new Scanner(System.in);
5. System.out.println("Enter variable to scan and take as input");
6. int variable=sc.nextInt();
(b) Critically evaluate the environment flexibility of programming in java.
Java for mobile application:
Java Micro Edition used in java for application improvement wherein it makes bundles for little
devices like pages, set-top boxes, telephones, et cetera. Java as Micro Edition is particularly
anticipated for battery worked instruments with little memory and deals with the rate. Java ME
gives an impeccable JVM to little scale units that are alluded to as KVM. It is a lessen down
adjustment of trendy JVM and redesigned for running in the little level of memory around 256
KB.
Hardware programming in Java:
Java offers a dispersion of Micro Edition API that is utilized for snared bundles, known as Java
ME Embedded. It charms creators to make astoundingly comfortable, bendy and utilitarian
applications for embedded contraptions like insurance shrouded camera, trade oversee structures,
flight holding securities and ATM machines (Van Nieuwpoort, R.V. & Maassen, 2005).
Platform independent
6
Flight Booking System: A Java-Based Desktop Application_7

A programming vernacular or improvement is expressed to be composed self-decision if and just
if that could keep up strolling on all open working structures concerning its progress and mixture.
Java is a platform independent as on presenting JDK (java advancement unit) programming on
structure then consequently JVM are provided in shape. For each working shape isolate, JVM is
open which is beneficial to observe the Class archive or bytecode when orchestrating Java code
by utilizing at that point. Magnificence report is made by javac compiler these codes are rational
through JVM and each working structure have its own one of a kind specific JVM so JVM is
getting ready subordinate in any case as a result of JVM java vernacular is progressed towards
getting the opportunity to sort out detached.
7
Flight Booking System: A Java-Based Desktop Application_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Airline Reservation System: A Java-Based Application for Efficient Flight Management
|2
|554
|412

Tower Defence 3D Game: A Comprehensive Guide to Design and Development
|54
|4554
|163

Order and Components - Thesis and Dissertation Guide
|8
|967
|75

Database Design and Development for Shoengalleric Art Gallery
|66
|5608
|329

GPS Technology and Applications
|66
|19648
|99

Computer Systems: Understanding, Design, Building, and Maintenance
|65
|6032
|422