Professional Documents
Culture Documents
Date
Abstract
The objectives of the report is to concentrate on deigning and implementing a Flight Booking payment system in Object oriented Programming, using JDBC ODBC connections and creating professional looking interface for capturing data into the database record. However, to achieve these objectives, research is inescapable in other to understand the technology behind any booking systems with GUI for user friendly. Search tool is an addon in this project, which makes the system more user-friendly as user does not have to look into hundreds or thousands of record before pulling up a customer details. This is made simple using customer passport number as a search parameter, although this can be incorporated with the primary key field (e.g. Customer Number, telephone number) depends on the user requirements. The search interface includes update and delete button and these are pined onto this interface so that staff can edit and delete customer details all on single interface.
Content
ABSTRACT ......................................................................................................................................................2 CONTENT ........................................................................................................................................................3 1 INTRODUCTION ..................................................................................................................................5 1.1 1.2 1.3 2 SCOPE ..............................................................................................................................................5 BACKGROUND..................................................................................................................................5 ROADMAP OF REPORT ......................................................................................................................6
LITERATURE REVIEW ......................................................................................................................7 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 INTRODUCTION ................................................................................................................................7 BOOKING SYSTEM ............................................................................................................................7 DIFFERENT TYPES OF DATABASE CONNECTIVITY .............................................................................8 OVERVIEW OF JDBC........................................................................................................................9 ROLE OF JDBC IN API ...................................................................................................................10 JDBC TOOLS ..................................................................................................................................10 SQL IN JAVA ...............................................................................................................................10 CONCLUSION..................................................................................................................................10
ANALYSIS ............................................................................................................................................12 3.1 INTRODUCTION ..............................................................................................................................12 3.2 APPLICATION DESCRIPTION ............................................................................................................12 3.2.1 Application objectives ..............................................................................................................12 3.3 APPLICATION INPUT .......................................................................................................................12 3.4 APPLICATION PROCESS (USE CASE) ................................................................................................13 3.5 APPLICATION OUTPUT ...................................................................................................................14 3.6 BUSINESS REQUIREMENTS .............................................................................................................14 3.7 USER REQUIREMENTS ....................................................................................................................14 3.8 FUNCTIONAL REQUIREMENTS ........................................................................................................14 3.9 NON-FUNCTIONAL REQUIREMENTS ...............................................................................................15 3.10 SYSTEM REQUIREMENTS ................................................................................................................15 3.10.1 Hardware requirements.......................................................................................................15 3.10.2 Software Specification .........................................................................................................15
DESIGN.................................................................................................................................................16 4.1 4.2 4.3 4.4 4.5 4.6 4.7 INTRODUCTION ..............................................................................................................................16 INPUT INTERFACE ...........................................................................................................................16 TOOLS AND SOFTWARE CHOICE .....................................................................................................19 CLASS DIAGRAM............................................................................................................................19 DATABASE RELATION SCHEMA ......................................................................................................20 PROCESS ........................................................................................................................................21 OUTPUT .........................................................................................................................................21
IMPLEMENTATION ..........................................................................................................................23 5.1 5.2 5.3 5.4 5.5 INTRODUCTION ..............................................................................................................................23 SOFTWARE CHOICE ........................................................................................................................23 USER INTERFACE (SCREEN SHOTS) .................................................................................................23 DATABASE SCHEMA .......................................................................................................................26 DATABASE CONNECTION ...............................................................................................................27
TESTING ..............................................................................................................................................30 6.1 6.2 6.3 6.4 INTRODUCTION ..............................................................................................................................30 TEST PLAN .....................................................................................................................................30 TEST CASE......................................................................................................................................31 TEST RESULTS ...............................................................................................................................32
CONCLUSION .....................................................................................................................................33 7.1 7.2 INTRODUCTION ..............................................................................................................................33 ANALYSIS AND DESIGN EVALUATION ............................................................................................33
3
7.2.1 Design stage .............................................................................................................................33 7.2.2 Testing stage.............................................................................................................................34 7.2.3 Done well..................................................................................................................................34 7.2.4 Possible Improvement ..............................................................................................................34 7.3 LESSON LEARNED ..........................................................................................................................35 8 9 REFERENCES .....................................................................................................................................36 APPENDIX TESTING RESULT SCREENSHOTS..........................................................................37 9.1 INTRODUCTION ..............................................................................................................................37
1 Introduction
This project is aim to design Flight Booking system that can be used over the phone. However, understanding the technology behind booking system is undoubtedly involve the use of latest technology and software and all of these point to detail research which in this project, titled literature review. After the research is done, then the knowledge gained will be analysed to give detail idea of specification and requirements for the system.
1.1 Scope
The main scope of the project will be focused on designing a system that will pull up customers booking record, converting or linking the database records (customer, flight and booking) to the object oriented and event driven-based interface to simplify data input. The project platform is undecided yet as the investigation and analysis stage will pave the way for system requirement or platform options that are available. Currently Unified Modelling language (UML) or Entity Relation Diagram will be one of the tools to start with in showing the relationships between the records. Also software development life cycle strategy is going to be one of my approaches to this project in gathering design and application requirements (table design, table relation, programming language etc). Base on the preliminary investigation, the project graphical user interface for data input and retrieval will be designed in Java.
1.2 Background
The aim of this project is to design and implement an application that will be used for taking payments for booked flight. This will necessitate connection of database to GUI to improve the data input and output methods graphically. This application will be however design to compatible with Ms Access for an easy running on local computer but the record can be converted presumably into high level database program like SQL or oracle at the cooperative level for server based.
2 Literature Review
2.1 Introduction
This chapter will be centred on the investigation to pave the way for the different approaches available and technology behind the development of any booking system. The research will help in understanding how the booking system works and implements the idea in designing different booking system application (e.g. flight booking/reservation system). Before the existence of object oriented programming, applications like booking system, sales-related applications are less user-friendly and also laborious to design as many programming languages then are monolithically developed, which are less powerful in accomplishing useful and powerful tasks. Bringing object oriented languages into lime light with GUI supportability makes the commercial applications worthwhile and also rapid interest of companies to switch to the GUI-based applications for their businesses.
Database storage
Form / Input
JDBC API
JDBC Driver
DBMS Middleware
DBMS server
DBMS server
manag
manag
ADO.Net: is the primary data access connection for Net languages. It is used to connect to data sources and retrieve, handle and update data that is stored in SQL server. (http://msdn.microsoft.com/en-us/library/h43ks021.aspx ).
OLE DB: it provides data access as ODBC but more codes are written as opposed to ODBC. ODBC: is the data accesses objection or connection for application written in C and C++ languages. JDBC: this is designed by the Microsoft as a free ware for easy connections for Java based application to SQL server and also to facilitate the writing and reading of SQL statements. It supports SQL server from 2000 to 2008 R5.
PHP5: is the connectivity design for PHP application to allow reading and writing of SQL data from within PHP scripts (http://msdn.microsoft.com/en-
us/sqlserver/connectivity.aspx#SNAC ).
As a java application developer, the focus will be on the connection that will be suitable and inline with the developer area of expertise and with the above listed connections, JDBC is the appropriate option considering the limited timeframe for this project which will not allow further explorations of the other available connections. In addition, choosing right connection at the earlier time will save or reduce risk of incompatibility errors at the implementation stage and also makes the project deliverable on time.
2.6
JDBC tools
There are many freeware tools available to write database connection code and for this project, J-Creator 2.1 will be used. There are however, many tools to use example Net Bean, Text Pad, and many text editor software tools depends on developer choice and what he is commonly used but Net bean is much complex and recommended for experienced software developers. J-Creator is easy to use compare to Net Bean and semi-professional when compare to text pad.
2.7
SQL IN JAVA
JDBC has powerful functions with the help of SQL packaged in java class. Unarguably, JDBC can be described as the heart of the application, which means that if the connection is not available, no query will be executed regardless of how simple or complicated it is. The execution of query, update and all SQL-based statements are made possible with the help of sql package which developer to be able to incorporate their idea of My SQL, database to design effective and efficient business applications. The following shows how the query is executed in the dataset with the help of the JDBC.
2.8
Conclusion
Booking system can be described as a system that allows input of booking data, process and output the booking information. Designing booking system constitutes creation of database schema (which can be Microsoft Access, MySQL, and Oracle etc.) where data will stored and managed and also
10
the interface for capturing data. However, there are unarguably many ways for designing and implementing booking systems but depends on developer choice and the functional requirements of the system because different tools perform different and identical tasks. Connecting to the database is of different types and also depends on what the system should achieve; PHP database connection is more and inevitably suitable for online booking system. It is clearer in the research that there are many IDE that can be chosen from and what difference they make on the interface output.
Implementing software development methodology which necessitates the investigation before implementation of any project has helped a lot in exploring ways to design application which can be applied to many booking systems. Differences in requirements are determine by asking user or stakeholder relative questions about what the system is expected to achieve using professional information gathering methods (e.g. observation, questionnaire etc), which will reduce the risk of requirement changes request.
11
3 Analysis
3.1 Introduction
This chapter will summarize the result from the research stage to descriptively analyse the system requirements and specifications and the project objectives.
Cancel: Flight ticket or transaction cancellation is input through this form. Search: the user will search for customer details using unique data field.
13
14
Delete record.
3.10.1
Hardware requirements
Processor; Pentium Dual core processor minimum, Intel or AMD Hard drive; 60 GB minimum RAM; 3GB Keyboard Mouse Disc drive Monitor
3.10.2
Software Specification
Java Standard Development Kit (JDK) version 1.4.2 or higher JAVA Microsoft Access Windows base Operating system preferably Windows XP 32bit with Service Park 3. JCreator IDE
15
4 Design
4.1 Introduction
This chapter focus on the design model adopted from the analysis stage of the project, which will be blue print for the implementation stage. The design will be of twofold which will be hierarchically selected and executed base on there dependency. The first fold will be brainstorming on how the interface and input prototype will be designed, following by the methods to use and tools that will help in achieving the design objectives.
Search Cancel
16
FK_CustomerNo
Payment
Amount
Date paid
FK_CustomerN o
Economy class 120.00 Business class 240.00
Make Payment
17
Cancellation Ticket Number Date Cancelled Status (Refund or Not) Cancel Booking
Search Customer Details CUSTOMER NO FIRST NAME LAST NAME DOB ADDRESS EMAIL PASSPORT TELEPHONENUM
Save Changes Delete Record Search Customer
18
19
20
4.6 Process
The process that occurs in the project or application is diagrammatically shown below;
4.7 Output
The out put of system will be displayed in GUI and/or DOS screen Most of the output for customer details, flight/booking records and payment records can be viewed in the tables, if the program is run in the text pad with DOS screen in the background, the record or data inserted into the database will show as shown in figure12 below. Search output displayed is a dual functions, it is an input as well as output.
21
The customer input the search criteria (Passport Number) and output the record on the same interface. Also the changes made to the record is saved back into the record where using the customer as the pointer because is the primary key.
Search Customer Details CUSTOMER NO FIRST NAME LAST NAME DOB ADDRESS EMAIL PASSPORT
TELEPHONENUMBER Save Changes Delete Record 19
Terry
Kerry 04/04/1960
01234567890
Search Customer
22
5 Implementation
5.1 Introduction
This section will focus on the development of actual system having layout it out in the design stage, however there is possibility that a change erupt during this stage as changes at the implementation are sometime inevitable. The stage will range from input design which will be of twofold, follow by the database schema design and coding as unarguably part of implementation.
23
The code details can be seen in the interface actual class where the buttons, labels, text field, are pined onto the frame (i.e. Customer Interface. java).
24
25
26
JDBC Connection is created using Administrative tool in control panel. Screen shot showing the connection
27
Referencing to the interface above, there are buttons, and textbox pined onto the interface and they are useless without the help of ActionListener () interface in Java class. The ActionListerner interface uses actionperformed method which applies to the TextField, JTextField, JComboBox and Button used in this project, with the If Statement which carries out the conditions and statements for each button pressed. Below is the screen shot of Save to Database button and the customer record is inserted into the customer table using the SQL statement.
The absence of customer number is intentional because it is assigned automatically in the database which is set to be primary key in the table and also in payment table and Flight ticket table.
28
The following screen shot showing when the each button is added to the ActionListener Method, if by any mistake the button is not added to the method, no action will perform regales of complex codes or SQL queries.
Considering the time, the above codes are adopted in other classes (flight ticket, cancel and payment).
29
6 Testing
6.1 Introduction
This chapter is centred on checking if the system is doing what is suppose to be doing. The testing is crucial stage in any development and this project it will be inevitable but also necessary for checking system functionalities. The testing will be of twofold:
The test will be carried out by the developer and is mainly to check the system functionalities. Testing methodology will be User and Unit Testing Required resources are as follows i. ii. iii. iv. Complete computer system or laptop running windows operating system Java Standard Development Kit (JDK) JCreator Microsoft Access
Features(Buttons)
Save to Database Press to cancel Booking ticket Search Customer Make Payment Save Changes Delete Record Process Transaction Cancel payment
Functions
To save data entered into the database To cancel the data entered but not to clear the screen To open Flight ticket interface from customer interface To search for customer records in the database record To open Payment interface via customer interface To save changes made to customer details via search interface To delete records from database but not to clear the screen To process payment To cancel transaction
30
Steps
1 2
Procedures
Open jcreator to run the source code Create the connection via administrative tools, enter the DSN name and must be similar to the JDBC ODBC name in the white box testing Open the customer interface code and run it Enter customer records and press save to database
Success criteria
Open without error The name is created and is the same as the JDBC ODBC name used in the source code Open and run without any error
3 3
4 5 6 7 8 9 10 11 12 13 14
Records is saved to the database and assigned customer number automatically Click on Booking ticket The Flight Ticket interface open up to input data Click book Ticket The booking is saved in the database Click search customer The search customer interface opens Click make payment The Flight payment Interface opens Enter the require payment details and Payment details save into the click process payment to database Click cancel payment No transaction details is recorded Enter the customer passport number and The customer record displays click search correctly Change any customer detail except the The record is updated customer and click save changes Press delete record The record is deleted Search the deleted record using the last No record should come up passport number Open the Cancel booking interface, enter Detail is saved in the database the necessary data and press cancel booking
31
Success criteria
Open without error
Actual Result
The Jcreator IDE opens successfully The name is created and is The DSN and JDBC the same as the JDBC name tally ODBC name used in the source code
5 6 7 8
9 10 11
12 13
14
Open and run without any The interface opens error and connection is successful Enter customer records and Records is saved to the Appendix 1 press save to database database and assigned customer number automatically Click on Booking ticket The Flight Ticket Interface opens interface open up to input successfully data Click book Ticket The booking is saved in Appendix 2 the database Click search customer The search customer Search interface interface opens opens Click make payment The Flight payment Payment interface Interface opens opens correctly Enter the require payment Payment details save into Appendix 3 details and click process the database payment to Click cancel payment No transaction details is Appendix 5 recorded Enter the customer passport The customer record Appendix 4 number and click search displays correctly Change any customer detail The record is updated Appendix 6 except the customer and click save changes Press delete record The record is deleted Appendix 8 Search the deleted record No record should come up No record is using the last passport displayed number Open the Cancel booking Detail is saved in the Appendix 7 interface, enter the necessary database data and press cancel booking
32
7 Conclusion
7.1 Introduction
This chapter is focused on both the work carried out so far in this project and the system functionality evaluation.
33
Database normalisation gives a little hard time because when the database is not normalise properly then the relationship between relations will not be fully effective and can lose referential integrity which is one of the error checking tools in database to ensure data is entered correctly, no replications and primary, foreign or candidate keys are correctly implemented.
34
the administrator to manage the system efficiently, effectively and less vulnerable to unauthorised access and system malfunctions. Communication; the business to customer communication channels can be improved via auto email for booking ticket and invoice confirmation. For instance, using Enterprise JavaBeans which is server side software but can be implemented to enhance this system to solve business related problems e.g. complex Database queries, pricing engine with a tax calculator for a websites shopping cart. Print; the system can be enhanced to be able to print records for filing purpose.
35
8 References
Books 1. Connolly, T and Begg, C, 2002, Database System (A practical Approach to Design, Implementation and Management), Third Edition, Prentice Hall. Schildt, H, 2007, Java The Complete Reference, Seventh Edition (Osborne Complete Reference series), McGraw-Hill Osborne. Hamilton, G, Cattell, R and Fisher, M, 1997, JDBC Database Access with Java, Addison Wesley Publishing Company.
2.
3.
36
37
38
39