Railway reservation system
Introduction
1
Railway reservation system
INTRODUCTION
To cope up with these day-to-day activities in Railway Reservation, the use of computer (in Railway Sector) is unavoidable.
This project provides the facility to all users to reserve the seats. They can also update and delete the reservation, and also get the information of the status of the train.
The Railway Reservation System aims at solving these day-to-day functions in reservation Sector:
Reservation,
2
Railway reservation system
Modification,
Cancellation,
Show All Transaction, etc.
SDLC Model
3
Railway reservation system
SDLC MODEL The System Development Life Cycle (SDLC),is a methodology that has been constructed to ensure that systems are designed and implemented in a methodical, logical and step-by-step approach.
There are various software deveolpemt approaches defined and designed which are used/employed during development process of software, these approaches are also referred as “Software Development Process Models”.
4
Railway reservation system
Each process model follows a particular life cycle in order to ensure successin process of software development.
One such approach/process which we are using for this site is “The waterfall Model”. Waterfall approach was first Process Model to be introduced and followed widely in Software Engineering to ensure success of the project. In “The Waterfall” approach, the whole process of software development is divided into separate process phases. The phases in Waterfall model are:Requirment specifications phase, Software Design, Implementation and Testing & Maintenance. All these phases are cascaded to each other so that second phase is started as and when defined set of goals are achieved for Methods and processes undertaken in Waterfall Model are more visible.
5
Railway reservation system
The software process model used for the railway reservation system is the “waterfall model”.
The waterfall model suggests a systematic, sequential approach to software development that begins at the system level and progresses through analysis, design,
6
Requirements/Analysis and Specifications
Design
Implementation and unit testing
Integration and system testing
Operation and maintainance
Railway reservation system
coding, testing, and support. This model encompasses the following activities:
Software Requirement Analysis
The goal of this phase is understand the exact requirement of the customer and to document them properly. This phase produces a large documents, which contain a description of what the system will do without describing how it will done. The resultant document is known as SoftwareRequirement Specifications(SRS).
Design
The goal of the phase is to transform the requirement specifications into a structure i.e suitable for implementation in some programming language. This work is documented and known as software design description(SDD) document.
Implementation and unit testing
The implementation or coding phase proceeds smoothly because all information
7
Railway reservation system
neededby the software developers contained in the SDD. During testing,the major activities are centered around the examination and modification of the code.
Integration ande system testing
Effective testing will contributed the delivery of higher quality software products,most satisfied the users, lower maintainence cost and more accurate and reliable results. This is little chance to determine that the interface between modules is also correct and for this reason integration testing is performed.
Operation and maintenance
Software maintenance is a task that every development group has to face,when the software is delivered to the customer side,installed and is operational. Maintenance is a very broad activity that includes error correction, enhancement of capabilities deletion of absolute capabilities and optimization.
8
Railway reservation system
Reasons for choosing WATERFALL MODEL :
In this model, a detailed checking is
done at each and every step by software
quality assurance (SQA) group and also
by the clients. That is why it involves
less risk of rejection by clients.
Good progress tracking due to clear
development stages
It is very easy to understand and
implement.
It is documentation driven, that is,
documentation is produced at every
stage.
Testing is inherent to every phase of the
waterfall model. So there is no need for
a separate testing phase.
9
Railway reservation system
Getting the requirements and design out
of the way first also improves quality; it's
much easier to catch and correct
possible flaws at the design stage.
Finally, the first two phases end in the
production of a formal specification, the
waterfall model can aid efficient
knowledge transfer when team members
are dispersed in different locations.
There are some disadvantages of the
waterfall model.
1)As it is very important to gather all possible
requirements during the Requirement 10
Railway reservation system
Gathering and Analysis phase in order to
properly design the system, not all
requirements are received at once, the
requirements from customer goes on
getting added to the list even after the end
of “Requirement Gathering and Analysis”
phase, this affects the system development
process and its success in negative aspects.
2)The problems with one phase are never
solved completely during that phase and in
fact many problems regarding a particular
phase arise after the phase is signed off,
this result in badly structured system as not
all the problem (related to a phase) are
solved during the same phase.
3)The project is not partitioned in phases in
flexible way.
As the requirements of the customer goes on getting added to the list, not all the requirements are fulfilled, this results in
11
Railway reservation system
development of almost unusable system. These requirements are then met in newer version of the system; this increases the cost of system development.
12
Railway reservation system
System
Analysis
SYSTEM ANALYSIS
What is System?
The term system is derived from the Greek word systema, which means an organized relationship among functioning units or components. A system exists
13
Railway reservation system
because it is designed to achieve one or more objectives. This means a system is an orderly grouping of interdependent components linked together according to a plan to achieve a specific objective. The study of systems concept has three basic implications:A system must be designed to achieve a predetermined objective.Interrelationship and interdependence must exits among components.The objectives of the organization as a whole have higher priority that the objectives of its subsystems.
How we know these objectives of the system? From the analysis of user’s requirements and studying present system. First of all we have to analyze present system thoroughly and asking all the problems of the user. Then check the feasibility of the system.
2.1 Feasibility Study and Cost Benefit Analysis of the System:
Feasibility Study:Feasibility study is done after
preliminary investigation. The feasibility
14
Railway reservation system
study means to check the feasibility of new system. There may be other alternative to the problems. Feasibility study is mainly three type eg. technical ,economic and operational feasibility. We have to check all conditions to the new system. From the analysis it is found that new system is feasible. Main points are as:
Technical Feasibility: During this study, it is found that the institute has enough resource to implement new system. There is already exists a computer systems with suitable hardware and software in the concerned department. There is no problem of financial resources and budgets. Thus the new system is technically feasible.
Economic Feasibility: Economic feasibility is the most important study that determines the cost and benefits of the proposed system and compares with the budget. The cost of the new system does not outweigh the budget. The cost of the project includes the cost of hardware, software, development and implementation. The new system also provides benefits that are expected from
15
Railway reservation system
the proposed system and compare these with the costs expected to spend on development of the system. Benefits are found to be more than costs, thus it is decided to develop new system. The new system provides both tangible (e.g., increased productivity, low operating cost, etc.) and intangible benefits (e.g., improved organizational planning, improved asset utilization, etc.) in a formal way. Thus the new system is economical feasible.
Operational Feasibility: It is found that the new system is both economic and technical feasible, the next step is to determine whether it is operationally feasible or not. During operational feasibility study, it is found that the system will operate in the way that user wants. There is enough human resources and there are qualified and experienced manpower available for development and implementation of the system. The new system is acceptable to the peoples and management. Thus the new system is also operational feasible. User involvement is more required in determining the operational feasibility.
16
Railway reservation system
Cost Benefit Analysis:Since cost plays an important role in
deciding the new system, it must be identified and estimated properly. Costs vary in types and consist of various distinct elements. Benefits are also of different type and can be grouped on the basis of advantages they provides to management. In estimating cost for the system, we considered several cost estimates which the concern will have to pay. Some cost factors are as:
Hardware Cost: This cost relates to actual purchase of computer and peripherals. Organization already has computer system and other peripherals. Thus there is no need to by new system. Thus system is cost feasible.
Personnel Cost: This cost include EDP staff salaries and benefits. In the organization there is already proper staff available. Thus there is no need to recruit additional staff. Thus new system is cost feasible.
17
Railway reservation system
Facility Costs: These are expenses incurred in the preparation of the site where computers are to be installed. This includes wiring, flooring etc. since there is proper site so there is no need to prepare extra site.
Supply Costs: These are variable costs which increase with increased use like the use of paper, disks, ink cartridges etc. since the system is fully automatic so it there is no problem of supply cost against the benefit.
Benefits of a system include four types:
Cost-saving Benefit: These benefits lead to reduction in administrative and operational costs. After implementation of new system there is no need to recruit extra staff. Even if extra person required to transfer information is not required because system is on Local network and Information can be accessed easily. So this system provides cost saving benefit over the administrative and operating cost.
18
Railway reservation system
Cost-Avoidance Benefit: These benefits are those, which eliminate future administrating and operational costs. Since there is enough person to handle the new system, so there is no need to hire additional staff in future. Thus the new system provides cost avoidance benefit.
Improved-Service-Level-benefit: These benefits are those where the performance of a system is improved by new system. Since there is manual system in the existing system, after implementation of new computer based system the performance of process will increases.
Improved-information-Benefit: This is the benefit where computer based methods leads to better information for decision-making. This system generates reports automatically, thus processing speed increased. Now more volume of transaction can be handled easily.Thus from above discussion the new system is better choice over traditional manual system.
19
Railway reservation system
2.2. System Planning
The system planning process consists the following:-
Setting the project start date.
Setting the project complete date.
Selecting the methodology or project life cycle to be used.
Determining the scope of the project in terms of the phase of the selecting project methodology or project life cycle.
Identifying any pre determined interim milestone on other critical dates which must be met.
Listing tasks, by project phase, in order in which they might be accomplished.
Determining skill level necessary to perform each task.
Determining task dependencies
o Which task can be done in parallel?
o Which task requires the completion of other tasks before they can start?
20
Railway reservation system
Performing project cost estimation and cost- benefit analysis.
21
Railway reservation system
System analysis is a process of gathering
and interpreting facts, diagnosing problems
and the information to recommend
improvements on the system. It is a problem
solving activity that requires intensive
communication between the system users
and system developers. System analysis or
study is an important phase of any system
development process. The system is studied
to the minutest detail and analyzed. The
system analyst plays the role of the
interrogator and dwells deep into the
working of the present system. The system
is viewed as a whole and the input to the
system are identified. The outputs from the
organizations are traced to the various
processes. System analysis is concerned
with becoming aware of the problem,
22
Railway reservation system
identifying the relevant and decisional
variables, analyzing and synthesizing the
various factors and determining an optimal
or at least a satisfactory solution or program
of action.
A detailed study of the process must be
made by various techniques like interviews,
questionnaires etc. The data collected by
these sources must be scrutinized to arrive
to a conclusion. The conclusion is an
understanding of how the system functions.
This system is called the existing system.
Now the existing system is subjected to
close study and problem areas are
identified. The designer now functions as a
problem solver and tries to sort out the
difficulties that the enterprise faces. The
23
Railway reservation system
solutions are given as proposals. The
proposal is then weighed with the existing
system analytically and the best one is
selected. The proposal is presented to the
user for an endorsement by the user.
The proposal is reviewed on user request
and suitable changes are made. This is loop
that ends as soon as the user is satisfied
with proposal.
Preliminary study is the process of
gathering and interpreting facts, using the
information for further studies on the
system. Preliminary study is problem solving
activity that requires intensive
communication between the system users
and system developers. It does various
feasibility studies. In these studies a rough
24
Railway reservation system
figure of the system activities can be
obtained, from which the decision about the
strategies to be followed for effective
system study and analysis can be taken.
Existing System
In the existing system the exams are done
only manually but in proposed system we
25
Railway reservation system
have to computerize all the exams using
this software.
Lack of security of data.
More man power.
Time consuming.
Consumes large volume of pare
work.
Needs manual calculations.
No direct role for the higher officials.
Proposed System
The aim of proposed system is to
develop a system of improved facilities. The
proposed system can overcome all the
limitations of the existing system. The 26
Railway reservation system
system provides proper security and
reduces the manual work.
Security of data.
Ensure data accuracy’s.
Proper control of the higher officials.
Minimize manual data entry.
Minimum time needed for the various
processing.
Greater efficiency.
Better service.
User friendliness and interactive.
Minimum time required.
PRELIMINARY INVESTIGATION
It’s the first step in the system development
life cycle to evaluate the feasibility of the
system. The goal of the preliminary
investigation is to appraise project requests. 27
Railway reservation system
It is neither a design study nor the collection
of details to explain the system in all
regards. But it is the collection of
information that assists the committee
members in making the appraisal of the
project requested and determine the
feasibility of the proposed project as an
informed judgment.
Following targets are achieved in the
process of preliminary investigation:
Understanding the concept and
objectives of the project requested.
Optimum size of the project.
Cost-benefits-analysis of alternative
approaches.
Evaluate the technical and operational
feasibility of alternatives.
Formation of report (Conclusion).
28
Railway reservation system
Submission of report to management -
recommendation, acceptance and
rejection of the project requested.
Conducting the investigation
Conducting the investigation means the
collection of data by the analysts during the
preliminary investigation through three
primary techniques, these are as follows.
I. Reviewing organization documents:
According to this method, the analysts
engaged in the investigation first
acknowledge themselves about the
29
Railway reservation system
organization involved in, or affected by
the project by examining organization
charts and studying written operating
procedures. For example, to review in
Offline examination proposal means
knowing first how the works & also how
the links are connected with the
databases. In this way, reviewing
organization document method proved
useful in achieving the stated objectives.
II. On-site observations: It is an another
significant techniques to collect data for
the purpose of investigation. As per this
method, the analyst observe the activity
of the system directly. One purpose of
on-site observation is to get as chose as
possible to the real system being
studied. All that is highly significant in
30
Railway reservation system
conducting the investigation in reference
to the proposed project.
III. Conducting Interviews: The above two
techniques tell the analyst how the
system operates but not provide enough
details to have a decision to be made
about the merits of a system proposal
and also the user views about current
operations, For this, analyst use
interviews to collect such details which
tell about the nature of the project
request and the reasons for submitting it.
Interview furnishes the details that
further explain the project and show
whether assistance is merited
economically, operationally and
technically.
31
Railway reservation system
OBJECTIVE
To design a database comprising of the required tables and to provide a Front End Application.
To allow a valid user to use the application.
Provide interface to all the tables used in the application for modification, cancellation and reservation of ticket (Reservation of tickets, modification tickets, cancellation tickets By Authorized Person).
Providing the reservation information and helping them to search reservation records.
32
Railway reservation system
1.1 Problem analysis
The system will make the management of reservation efficient. It will make easier for the user to maintain the reservation records in a systematic way. The information flows from one stage to other become easy and more accessible.
The use of proper system will enable the user to quickly answer customer’s queries. And there will be no need of searching whole lot of registers for small information.
Thus, it will make the processing of information faster. The system provides printed reports to the customer, thus accelerating the response time. The system ensures security of the
33
Railway reservation system
customer’s record, so that no illegal modifications can be made to it.
1.2 Requirement Analysis
User Interface
Here, our the user interface of the proposed system shall be VB forms containing Menu bars, Buttons, Keyboard Shortcuts, Check boxes, List boxes etc. according to the requirement. User can use Mouse to click the button or choose from the menu and Keyboard to enter the data.
Hardware Interfaces
This software product shall be run properly on IBM PC or any other PC the minimum hardware requirement for this
34
Railway reservation system
software product shall be 64 MB RAM, 10 GB or more secondary memory, CD ROM for installation of this product. This software product shall use WINDOW 98 operating system for establish the interface between software and hardware. The interfaces provided by the Windows OS are sufficient. Oracle and VB also use same interfaces.
Software Interfaces We shall uses the following software to design this product :
Microsoft VISUAL BASIC version 6.0 as programming language and as front end user interface.
ORACLE version as a data base.
WINDOW version 95/98 as an operating system.
35
Railway reservation system
MDAC (Microsoft Data Access Component) or ODBC (Open Data Base Connectivity) to create an inter face between Microsoft VB and product ORACLE.
MDAC or ODBC is a S/W that acts as an interface between Oracle and VB forms. In case of Intranet/LAN workstations, where same data is shared among many users, global data area is used.
Communication Interfaces
Since our proposed system shall be net-enabled so, communication interface is Required . Proposed system contains four sites working concurrently. In the proposed system, single database which is common to all four sites will be available on server and all sites will be attached to server actively. In case of intranetworking, Windows NT protocols are already in use. In case of mailing to developers for further query,
36
Railway reservation system
Microsoft Outlook Express is by default used by the Windows OS.
1.3 Hardware and Software Requirement
RAILWAY RESERVATION SYSTEM requires following resources for its optimal performance: -
Railway System works on systems having Windows as the Operating System. Railway System can work on any of the Windows Versions such as Windows 95, Windows 98, Windows 2000, and Windows NT etc.
The Software used for developing our project named “ Railway reservation System ” is as follows: -1) Coding of the project – Visual Basic 6.02) Components of the project – Visual Basic 6.03) Maintenance and recording of data – Oracle4) Hardware required - Pentium 4 160 GB Hard disk
37
Railway reservation system
504 MB RAM
1.4 FEASIBILITY STUDY
1.4.1 OPERATIONAL FEASIBILITY
It is mainly related to human organizational and political aspects. The points to be considered are:
What changes will be brought with the system?
What organizational structures are disturbed?
38
Feasibility study
Operationalfeasibility
Economicalfeasibility
Technicalfeasibilty
Railway reservation system
What new skills will be required? Do the existing staff members have these skills?
If not, can they be trained in due course of time?
Generally project will not be rejected simply because of operational in feasibility but such considerations are likely to critically affect the nature and scope of the eventual recommendations.
For operational feasibility study we appointed a small group of people who are familiar with information system techniques, who understand the parts of the business that are relevant to the project and are skilled in system analysis and design process.
1.4.2 ECONOMIC FEASIBILITY
Economic analysis is the most frequently used technique for evaluating the effectiveness of a proposed system. More commonly known as cost / benefit analysis; in this procedure we determine the benefits and savings that are expected
39
Railway reservation system
from a proposed system and compare them with costs. We found the benefits outweigh the costs; we take a decision to design and implement the new proposed system.
It is very essential to ascertain the cost, which is to incur for developing the project, before starting the development of the project. If the benefit, which is to be accrued by developing the software, exceeds the cost to be incurred for developing the project by a fair amount of margin, then only the software should be developed. The process of cost and benefit analysis is not only limited prior to the time period of development of the project, but this process is a continuous process, and it keeps on going during the entire life cycle of the software.
ANALYSIS OF COST
The programmer has done the analysis of cost of the project named “Railway Reservation System” in a very effective manner. According to the programmer, the total cost involved in the development and
40
Railway reservation system
implementation of the software at the client site would be around Rs. 40000. This is so, as the process is manual, a computer system is to be purchased to implement the project at the Organization. The computer system would cost around Rs.26000, the cost involved in the development of the project would be around Rs.5000, the cost involved in the purchase of software required for implementing the project would be around Rs.5000, and above all the cost of training the manager to use the software is around Rs.3000 as the manager is not familiar with computers.
ANALYSIS OF BENEFIT
As it is necessary to do cost analysis of the developed project, it is also very essential to do benefit analysis along with it. The programmer has done the analysis of the benefit arising from the use of the software named “Railway Reservation system” in a very effective way.
1.4.3 TECHNICAL FEASIBILITY
41
Railway reservation system
This is concerned with specifying equipment and software that will successfully satisfy the user requirement. The technical needs of the system may vary considerably, but might include:
The facility to produce outputs in a given time.
Response time under certain conditions.
Ability to process a certain volume of transaction at a particular speed.
Facility to communicate data to distant location.
After examining technical feasibility, we give more importance to the configuration of the system than the actual make of hardware. The configuration gives the
complete picture about the system's requirements: Twenty to thirty workstations are required; these units should be interconnected through LAN or Internet so
42
Railway reservation system
that they could operate and communicate smoothly.
They should have enough speeds of input and output to achieve a particular quality of printing.
43
Railway reservation system
System
Design
DESIGN
44
Railway reservation system
Design Principles
The design should be traceable to the analysis model.
The design should “ minimize the intellectual distance” between the software and the problem as it exists in the real world.
The design should exhibit uniformity and integration.
The design should be structured to accommodate change.
The design should be structured to degrade gently, even when aberrant data, events, or operating conditions are encountered.
The design is not coding, coding is not design.
45
Railway reservation system
The design should be assessed for quality as it is being created, not after the fact.
The design should be reviewed to minimize conceptual errors.
2.1 ENTITY RELATIONSHIP DIAGRAM
46
Railway reservation system
ENTITY-RELATIONSHIP DIAGRAM
OF THE PROJECT
Explaining the ER diagram drawn before with respect to the above components.
47
PASSENGERPASSENGER
TRAINTRAIN
RESERVE TICKET
ADDRESSADDRESSNAMENAME
TRAIN DATE
TRAIN DATE
PH_NO.PH_NO.
TRAIN_NOTRAIN_NO
DESTINATIONDESTINATION
IDID
TIC_NOTIC_NO
Railway reservation system
Data objects involved in our system:
Passenger
Train
Attributes of each data object are:
Attributes of data object “Passenger” are:Id, name , address,Tic_no, & ph_ no.
Attributes of data object “Train” are: Train_no,Traindate and destinction.
Relationship between data object are defined as follows:
Many passenger can request for reservation to a single user and occurrences of both are mandatory.
48
Railway reservation system
A report is released corresponding to
each result and occurrences of both are
mandatory.
49
Railway reservation system
2.2 DATA FLOW DIAGRAM
A Data Flow Diagram (DFD) is a diagram that describes the flow of data and the processes that change or transform data throughout a system. It’s a structured analysis and design tool that can be used for flowcharting in place of, or in association with, information oriented and process oriented system flowcharts.
When analysts prepare the Data Flow Diagram, they specify the user needs at a level of detail that virtually determines the information flow into and out of the system and the required data resources. This network is constructed by using a set of symbols that do not imply a physical implementation.
The Data Flow Diagram reviews the current physical system, prepares input and output specification, specifies the implementation plan etc.
50
Railway reservation system
Four basic symbols are used to construct data flow diagrams. They are symbols that represent data source, data flows, and data transformations and data storage. The points at which data are transformed are represented by enclosed figures, usually circles, which are called nodes.
Data Flow Diagram Symbols:-
(1) Source or Destination of data (External Entities) :
External entities represents any entity that supplies or receives information from
the system but is not a part of the system
(2) Data Flow :
The data flow is used to describe the movement of chunks or packets of
information from one part of the system to another part. Flows represents data
in motion.
51
Railway reservation system
(3) Process :
Process shows a part of the system that transforms inputs into outputs. That is, it
shows how one or more inputs are changed into outputs.
(4) Storage :
The data store is used to model a collection of data packets at rest. Any place
accumulates is a data store.
CONTEXT LEVEL DATA FLOW DIAGRAM
LEVEL-1 DATA FLOW DIAGRAM
52
PASSENGER
RAILWAY
RESERVATION
SYSTEM
ISSUE
TICKET
REJECT
REQUEST
QUERY
VALID REQUEST
INVALID REQUEST
PASSENGER
Railway reservation system
Train
53
Interact with user
(atten-dant)
DATA ENTRY &
VERIFICA-TIONS
TRAIN
TIMETABLE
Transaction
occur
Review and approval
ISSUE TICKET
Reports
Approved result
Resultant data
Add passenger
detail
Analyzed data
Reserve
Railway reservation system
2.3 DATABASE DESIGN
Table Name: TRAIN
Field Name Data TypeT_NO Number(4)T_NAME Varchar2(20)ST_FROM Varchar2(20)ST_TO Varchar2(20)DEP_DT DateDEP_TIME Number(5,2)FC_TOT Number(3)BC_BK Number(3)SC_TOT Number(3)SC_BK Number(3)AC_TOT Number(3)AC_BK Number(3)
This table contains the information of the train.
54
Railway reservation system
Table Name: RESERVE
This table contain the information of the ticket reservation.
55
Field Name Data TypeT_NO Number(4)TIC_NO Number(5)NAME Varchar2(20)ST_FROM Varchar2(12)ST_TO Varchar2(12)J_DT DateCLASS Varchar2(15)
Railway reservation system
2.3 USER INTERFACE DESIGN
Railway System fulfills the following criteria: -
LOGIN SCREEN
This is login screen where you can enter password. When you enter password and click on enter then software validate your password, when your password is correct then software
56
Railway reservation system
provide all facility of the software otherwise show error message and exit out form the software.
SPLASH SCREEN
57
Railway reservation system
MDIFORM
This is main screen, you can see the control screen. You can operate all function of the software only from here.
58
Railway reservation system
RESERVATION
59
Railway reservation system
This is reservation screen from where you can take reservation of the railway where you want to go.
QUERY
60
Railway reservation system
This is used for select the criteria for query.
REPORT
It shows the report about train information and reservation information.
61
Railway reservation system
SUCCESS
It shows the reservation have been completed.62
Railway reservation system
CANCEL
It shows the reservation have been cancelled.
63
Railway reservation system
QUIT
64
Railway reservation system
Coding
65
Railway reservation system
CODING
The goal of coding or programming is to translate the design of the system produced during the design phase into code in a given programming language which can be executed by a computer and that performs the computation specified by the design for a given design the aim is to implement the design in a best possible manner.
During the implementation,it should be kept in mind that the programs should not be constructed so that they easy to write but so that they easy to read and understand.
66
Railway reservation system
LOGIN SCREEN
Private Sub Command2_Click()EndEnd Sub
Private Sub lgn_Click()If pw.Text = "railway" Then Unload Me Load frmSplash frmSplash.ShowElse MsgBox "Invalid password"
67
Railway reservation system
End IfEnd Sub
SPLASH SCREEN
Private Sub Timer1_Timer()I = I + 1If I > 3 ThenUnload Me'Load mainMDIForm1.ShowEnd IfEnd Sub
Private Sub Timer2_Timer()Label3.ForeColor = RGB(255, 255, 255) * RndLabel4.ForeColor = RGB(255, 255, 255) * RndLabel5.ForeColor = RGB(255, 255, 255) * RndLabel6.ForeColor = RGB(255, 255, 255) * RndEnd Sub
68
Railway reservation system
QUERY
Public connect As New ADODB.ConnectionDim RS As New ADODB.RecordsetDim rs1 As New ADODB.RecordsetDim comm As New ADODB.Command
Private Sub COMFIELD_CLICK()Text1.Text = " "MSHFlexGrid1.ClearEnd Sub
Private Sub Command1_Click()Select Case COMFIELD.TextCase "T_NO"
69
Railway reservation system
If LIST1.Text = "TRAIN DETAILS" Then Set RS = connect.Execute("SELECT * FROM TRAIN WHERE T_NO='" & Text1.Text & "'") End If If LIST1.Text = "RESERVATION DETAILS" Then Set rs1 = connect.Execute("SELECT * FROM RESERVE WHERE T_NO='" & Text1.Text & "'") End IfCase "T_NAME" Set RS = connect.Execute("SELECT * FROM TRAIN WHERE T_NAME='" & Text1.Text & "'")Case "DEP_DT" Set RS = connect.Execute("SELECT * FROM TRAIN WHERE DEP_DT='" & Text1.Text & "'")Case "TIC_NO" Set rs1 = connect.Execute("SELECT * FROM RESERVE WHERE TIC_NO='" & Text1.Text & "'")Case "CLASS" Set rs1 = connect.Execute("SELECT * FROM RESERVE WHERE CLASS='" & Text1.Text & "'")End SelectIf LIST1.Text = "TRAIN DETAILS" Then If RS.RecordCount = 0 Then MsgBox "NO RECORD FOUND" Else
70
Railway reservation system
Set MSHFlexGrid1.Recordset = RS End IfEnd IfIf LIST1.Text = "RESERVATION DETAILS" Then If rs1.RecordCount = 0 Then MsgBox "NO RECORD FOUND" Else Set MSHFlexGrid1.Recordset = rs1 End IfEnd IfEnd Sub
Private Sub Form_Load()connect = "Provider=MSDAORA.1;Password=tiger;User ID=scott;Persist Security Info =True"connect.Opencomm.ActiveConnection = connectconnect.CursorLocation = adUseClientLIST1.AddItem "TRAIN DETAILS"LIST1.AddItem "RESERVATION DETAILS"RS.Open "SELECT * FROM TRAIN", connect, adOpenKeyset, adLockBatchOptimisticrs1.Open "SELECT * FROM RESERVE", connect, adOpenKeyset, adLockBatchOptimistic
71
Railway reservation system
End Sub
Private Sub Form_Unload(Cancel As Integer)connect.CloseEnd Sub
Private Sub List1_Click()COMFIELD.ClearText1.Text = " "MSHFlexGrid1.ClearDim numfield As IntegerIf LIST1.Text = "TRAIN DETAILS" Then Set RS = connect.Execute("SELECT T_NO,T_NAME,DEP_DT FROM TRAIN") numfield = RS.Fields.Count For I = 0 To numfield - 1 COMFIELD.AddItem RS.Fields(I).Name NextEnd IfIf LIST1.Text = "RESERVATION DETAILS" Then Set rs1 = connect.Execute("select T_NO,TIC_NO,CLASS from reserve") numfield = rs1.Fields.Count For I = 0 To numfield - 1 COMFIELD.AddItem rs1.Fields(I).Name
72
Railway reservation system
NextEnd IfEnd Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)If KeyCode = 13 Then Command1.SetFocus Command1_ClickEnd IfEnd Sub
RESERVATION
73
Railway reservation system
Public connect As New ADODB.ConnectionDim RS As New ADODB.RecordsetDim rs1 As New ADODB.Recordset'Dim rs2 As New ADODB.RecordsetDim comm As New ADODB.CommandDim ADDCHECK As Boolean ' BY DEFAULT FALSEDim MODCHECK As BooleanDim MCLASS As StringDim LCLASS As StringDim MTICNO As StringDim LTICNO As String
Private Sub Datatno_Change()Set RS = connect.Execute("SELECT * FROM train where t_no=" & Datatno.Text)
74
Railway reservation system
tname.Text = RS("t_name")tstfr.Text = RS("st_from")tstto.Text = RS("st_to")tdtdp.Text = Format(RS!dep_dt, "DD-MMM-YYYY")tdptm.Text = RS("dep_time")pjdt.Text = tdtdp.TextIf ADDCHECK = True Or MODCHECK = True Then pname.SetFocusEnd IfEnd Sub
Private Sub Form_Load()connect = "Provider=MSDAORA.1;Password=tiger;User ID=scott;Persist Security Info =True"connect.Opencomm.ActiveConnection = connectconnect.CursorLocation = adUseClientRS.Open "SELECT * FROM TRAIN", connect, adOpenKeyset, adLockBatchOptimisticWith Datatno.ListField = "T_NO"Set .RowSource = RSIf Not RS.EOF Then RS.MoveFirst
75
Railway reservation system
.Text = RS("T_NO")End IfEnd Withrs1.Open "select * from reserve", connect, adOpenKeyset, adLockBatchOptimisticDatatno_ChangeEnd Sub
Function ADDFUNCTION()BUTTONHANDLER ("00000110")ADDCHECK = TrueDatatno.Enabled = Truepname.Enabled = Truepclass.Enabled = Truepticno.Enabled = Truepname.Text = " "pticno.Text = " "pclac2.Value = Falsepclfc.Value = Falsepclsc.Value = False'rs1.AddNewEnd Function
Function SAVEFUNCTION()Set RS = connect.Execute("SELECT * FROM train where t_no=" & Datatno.Text)
76
Railway reservation system
If pname.Text = " " Or _ (pclac2.Value = False And pclfc.Value = False And pclsc.Value = False) Or _ pticno.Text = " " Then MsgBox "FIELD CAN'T BE LEFT BLANK" BUTTONHANDLER ("00000110") Exit FunctionEnd IfIf ADDCHECK = True Then If pclac2.Value = True Then MCLASS = "AC2" ElseIf pclfc.Value = True Then MCLASS = "FC" ElseIf pclsc.Value = True Then MCLASS = "SC" End If connect.Execute ("INSERT INTO RESERVE VALUES('" & Datatno.Text & "' , '" & pticno.Text & "' , '" & pname.Text & "' , '" & tstfr.Text & "' , '" & tstto.Text & "' , '" & pjdt.Text & "' , '" & MCLASS & "')") If MCLASS = "AC2" Then connect.Execute ("UPDATE TRAIN SET AC2_TOT=AC2_TOT-1,AC2_BK=AC2_BK+1 WHERE T_NO=" & Datatno.Text)
77
Railway reservation system
End If If MCLASS = "FC" Then connect.Execute ("UPDATE TRAIN SET FC_TOT=FC_TOT-1,FC_BK=FC_BK+1 WHERE T_NO=" & Datatno.Text) End If If MCLASS = "SC" Then connect.Execute ("UPDATE TRAIN SET SC_TOT=SC_TOT-1,SC_BK=SC_BK+1 WHERE T_NO=" & Datatno.Text) End IfSuccess.showEnd IfIf MODCHECK = True Then If pclac2.Value = True Then MCLASS = "AC2" ElseIf pclfc.Value = True Then MCLASS = "FC" ElseIf pclsc.Value = True Then MCLASS = "SC" End If connect.Execute ("UPDATE RESERVE SET TIC_NO='" & pticno.Text & "' ,NAME='" & pname.Text & "' ,CLASS= '" & MCLASS & "' WHERE TIC_NO='" & LTICNO & "'")
78
Railway reservation system
' UPDATE TRAIN WITH THE OLD VALUES If LCLASS = "AC2" Then connect.Execute ("UPDATE TRAIN SET AC2_TOT=AC2_TOT+1,AC2_BK=AC2_BK-1 WHERE T_NO=" & Datatno.Text) End If If LCLASS = "FC" Then connect.Execute ("UPDATE TRAIN SET FC_TOT=FC_TOT+1,BC_BK=BC_BK-1 WHERE T_NO=" & Datatno.Text) End If If LCLASS = "SC" Then connect.Execute ("UPDATE TRAIN SET SC_TOT=SC_TOT+1,SC_BK=SC_BK-1 WHERE T_NO=" & Datatno.Text) End If' UPDATE TRAIN WITH THE NEW VALUES If MCLASS = "AC2" Then connect.Execute ("UPDATE TRAIN SET AC2_TOT=AC2_TOT-1,AC2_BK=AC2_BK+1 WHERE T_NO=" & Datatno.Text) End If If MCLASS = "FC" Then
79
Railway reservation system
connect.Execute ("UPDATE TRAIN SET FC_TOT=FC_TOT-1,BC_BK=BC_BK+1 WHERE T_NO=" & Datatno.Text) End If If MCLASS = "SC" Then connect.Execute ("UPDATE TRAIN SET SC_TOT=SC_TOT-1,SC_BK=SC_BK+1 WHERE T_NO=" & Datatno.Text) End IfEnd If
ADDCHECK = FalseMODCHECK = FalseDatatno.Enabled = Falsepname.Enabled = Falsepclass.Enabled = Falsepticno.Enabled = Falsepname.Text = " "pticno.Text = " "pclac2.Value = Falsepclfc.Value = Falsepclsc.Value = FalseBUTTONHANDLER ("11000001")End Function
80
Railway reservation system
Function SRHFUNCTION()MTICNO = InputBox("ENTER TICKET NUMBER")Set rs1 = connect.Execute("SELECT * FROM RESERVE WHERE TIC_NO='" & MTICNO & "'")If rs1.RecordCount = 0 Then MsgBox "DATA NOT FOUND" BUTTONHANDLER ("11000001")Else Datatno.Text = rs1("T_NO") Datatno_Change pname.Text = rs1("NAME") pticno.Text = rs1("TIC_NO") LTICNO = rs1("TIC_NO") pjdt.Text = Format(rs1!J_DT, "DD-MMM-YYYY") LCLASS = rs1("CLASS") If rs1("Class") = "AC2" Then pclac2.Value = True ElseIf rs1("CLASS") = "FC" Then pclfc.Value = True ElseIf rs1("CLASS") = "SC" Then pclsc.Value = True End If BUTTONHANDLER ("00111001")End If
81
Railway reservation system
End Function
Function CLRFUNCTION()pname.Text = " "pticno.Text = " "pclac2.Value = Falsepclfc.Value = Falsepclsc.Value = FalseBUTTONHANDLER ("11000001")End Function
Function MODFUNCTION()MODCHECK = Truepname.Enabled = Truepclass.Enabled = Truepticno.Enabled = TrueBUTTONHANDLER ("00000110")End Function
Function DELFUNCTION()Set RS = connect.Execute("SELECT * FROM train where t_no=" & Datatno.Text) If pclac2.Value = True Then MCLASS = "AC2" ElseIf pclfc.Value = True Then
82
Railway reservation system
MCLASS = "FC" ElseIf pclsc.Value = True Then MCLASS = "SC" End If connect.Execute ("DELETE FROM RESERVE WHERE TIC_NO='" & pticno.Text & "'")' UPDATE TRAIN WITH THE OLD VALUES If LCLASS = "AC2" Then connect.Execute ("UPDATE TRAIN SET AC2_TOT=AC2_TOT+1,AC2_BK=AC2_BK-1 WHERE T_NO=" & Datatno.Text) End If If LCLASS = "FC" Then connect.Execute ("UPDATE TRAIN SET FC_TOT=FC_TOT+1,BC_BK=BC_BK-1 WHERE T_NO=" & Datatno.Text) End If If LCLASS = "SC" Then connect.Execute ("UPDATE TRAIN SET SC_TOT=SC_TOT+1,SC_BK=SC_BK-1 WHERE T_NO=" & Datatno.Text) End IfCLRFUNCTIONBUTTONHANDLER ("11000001")Cancel.show
83
Railway reservation system
End Function
Function CANFUNCTION()ADDCHECK = FalseMODCHECK = FalseDatatno.Enabled = Falsepname.Enabled = Falsepclass.Enabled = Falsepticno.Enabled = Falsepname.Text = " "pticno.Text = " "pclac2.Value = Falsepclfc.Value = Falsepclsc.Value = FalseBUTTONHANDLER ("11000001")End Function
Private Sub Form_Unload(Cancel As Integer)connect.CloseEnd Sub
84
Railway reservation system
REPORT
Private Sub Form_Activate()Option1.Value = FalseOption2.Value = FalseEnd Sub
Private Sub Option2_Click()85
Railway reservation system
If Option2.Value = True ThenRESERVERPT.ShowElseREPORT.ShowEnd IfEnd Sub
Private Sub Option1_Click()If Option1.Value = True ThenTRAINRPT.ShowElseREPORT.ShowEnd IfEnd Sub
MDIFORM
Private Sub MNUFEXIT_Click()End
86
Railway reservation system
End Sub
Private Sub MNUFQRY_Click()BUTTONHANDLER ("00000001")QUERY.ShowEnd Sub
Private Sub MNUFRES_Click()BUTTONHANDLER ("11000001")reserve.ShowEnd Sub
Private Sub MNUFRP_Click()BUTTONHANDLER ("00000001")REPORT.ShowEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Dim FRM As VariantOn Error GoTo ERRHANDLERSet FRM = MDIForm1.ActiveFormSelect Case Button.KeyCase "ADDREC" FRM.ADDFUNCTION
87
Railway reservation system
Case "SRHREC" FRM.SRHFUNCTIONCase "CLRREC" FRM.CLRFUNCTIONCase "MODREC" FRM.MODFUNCTIONCase "DELREC" FRM.DELFUNCTIONCase "SAVEREC" FRM.SAVEFUNCTIONCase "CANREC" FRM.CANFUNCTIONCase "CLSFRM" Unload FRMEnd SelectERRHANDLER:Exit SubEnd Sub
88
Railway reservation system
CANCEL
Private Sub CMDNO_Click()Unload Me MDIForm1.ShowEnd Sub
89
Railway reservation system
Private Sub CMDYES_Click() LOGIN.ShowEnd Sub
SUCCESS
Private Sub CMDNO_Click()Unload MeEnd Sub
Private Sub CMDYES_Click()
90
Railway reservation system
Unload MeLOGIN.ShowEnd Sub
QUIT
Private Sub CMDNO_Click()Unload MeLoad MDIForm1 MDIForm1.ShowEnd Sub
91
Railway reservation system
Private Sub CMDYES_Click() EndEnd SubMODULE
Dim SECONNECT As ADODB.ConnectionDim STRCONNECTION As String
Sub MAIN()STRCONNECTION = "Provider=MSDAORA.1;Password=TIGER;User ID=SCOTT;Persist Security Info=True"OPENDATALOGIN.Show'MDIForm1.Show'Unload USEREnd Sub
Function OPENDATA()On Error Resume NextCLOSEDATASECONNECT.Open STRCONNECTIONEnd FunctionFunction CLOSEDATA()
92
Railway reservation system
On Error Resume NextSECONNECT.CloseEnd FunctionFunction BUTTONHANDLER(BTNSTATE As String)Dim I As IntegerFor I = 1 To Len(BTNSTATE)If Mid(BTNSTATE, I, 1) = "1" ThenMDIForm1.Toolbar1.Buttons(I).Enabled = TrueElseIf Mid(BTNSTATE, I, 1) = "0" ThenMDIForm1.Toolbar1.Buttons(I).Enabled = FalseEnd IfNextEnd Function
93
Railway reservation system
Testing
TESTING
94
Railway reservation system
Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and code generation. Once source code has been generated, software must be tested to uncover as many tests as possible before delivery to the customer.
These techniques provide systematic guidance for designing tests that exercise the internal logic of software components and exercise the input and output domains of the program to uncover errors in program function, behavior, and performance.
Testing Objectives:
The rules that can serve well as testing objectives:
Testing is a process of executing a program with the intent of finding an error.
95
Railway reservation system
A good test case is one that has a high probability of finding an as-yet-undiscovered error.
96
Railway reservation system
Testing Screen
LOGIN SCREEN
97
Railway reservation system
Wrong password
RESERVATION
98
Railway reservation system
Wrong ticket number
99
Railway reservation system
Field left bank
QUERY100
Railway reservation system
101
Railway reservation system
No record found
102
Railway reservation system
Reservation details
103
Railway reservation system
Reservation confirmed
104
Railway reservation system
Reservation cancelled
105
Railway reservation system
Reports
Report 1
106
Railway reservation system
Report 2
107
Railway reservation system
Report 3
108
Railway reservation system
CONCLUSION
The project is developed keeping in mind the growing necessity of the RAILWAY RESERVATION SYSTEM.
“Railway reservation system” is a useful product for managing the reservation within an organization. This project provides the facility to all users to do operations of the train. They can also update & delete the reservation, and also get the information of the status of reservation. The project provides the facility to add new customer. The user has the right to get any information about the reservation at any time without any permission of regarding department.
Though this project the working department can enter the information of the new reservation, can update reservation & can also delete reservation as per the request of the user.
So, the project has capabilities of improving from its present state. The project in future can
109
Railway reservation system
be used as a base to develop a new project with more facilities added in it. We can also change this project so that it can work on different platform.
Future Scope and Limitations
110
Railway reservation system
Scope of project
The main benefit of this project is that it
facilitate user to communicate in a faster
manner in comparison of manual system.
Through this system the current status of the
reservation can be known easily whereas in
manual system it is a difficult task.
To provide quick service without any delay.
The future project can include the facility of web-application so that customer can access their reservation, pay bills and solve their queries online
The future project can provide a back plan for
functionality.
111
Railway reservation system
Limitation of the project
Railway System may not work properly on Linux and Macintosh based Systems.
Railway System requires its users to have prior knowledge of both computers and reservation procedure.
There is no provision for waiting list, ID proof, photograph and Signature for verification purpose.
BIBLIOGRAPHY112
Railway reservation system
Software Engineering – A Practitioner’s Approach
By Roger S. Pressman
Software Engineering By K. K. Aggarwal
Yogesh Singh
An Introduction to Database SystemsBy Elmasri
Navathe
Oracle PL/SQLBy Ivan Bayross
113
Top Related