project report railway c

78
Raipur Nardani, Bantalab, Jammu. ON SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF DEGREE OF BACHELOR OF COMPUTER APPLICATION (BCA) BY SUNNY KUMAR(13) SUNIL SEHGAL(72) SUSHIL SINGH JAMWAL(56)

Upload: puneet-chawla

Post on 03-Dec-2014

112 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Project Report RAILWAY C

Raipur Nardani, Bantalab, Jammu.

ON

SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE

AWARD OF DEGREE OF

BACHELOR OF COMPUTER APPLICATION (BCA)

BY

SUNNY KUMAR(13) SUNIL SEHGAL(72) SUSHIL SINGH JAMWAL(56)

UNDER THE GUIDANCE OF

MR IMRAN KHAN

Page 2: Project Report RAILWAY C

CERTIFICATE

TRIKUTA COLLEGE OF COMPUTER SCIENCE

& MANAGEMENT STUDIES

Raipur Nardani, Bantalab, Jammu.

This is to certify that the project report entitled “RAILWAY RESERVATION” submitted to UNIVERSITY OF JAMMU in partial fulfillment of the requirements for the award of the degree of Bachelar Of Computer Science (B.C.A IIIrd) is the work done by Sunny Kumar, Sunil Seghal, Sushil Singh Jamwal under enrollment no……………. ………………………..they has completed this project successfully .They had taken keen interest in their attempt and their academic record is also good. I wish them a bright future and success in every walk of life.

PRINCIPAL Project guide

MR.SHABIR A.KHAN Mr. IMRAN KHAN

Page 3: Project Report RAILWAY C

ACKNOWLEDGEMENT

I take this opportunity to express my profound sense gratitude and respect to all those who helped me throughout this endeavor.

I would like to express my heartfelt thanks to my reversed teacher and

guide

Mr Imran Khan incharge project Trikuta College Of Computer Science & MANAGEMENT STUDIES, Raipur Bantalab for her Valuable support, guidance and encouragement

throughout my studentships under her guidance at college.

The tips were so important in development of this database. All those informal discussions were a beckon of light for me in entire duration of this work.

I would like to thank entire staff of Trikuta College Of Computer Science & MANAGEMENT STUDIES, Raipur Bantalab, for their time- time helpful suggestion.

Last but not least ; I owe my overwhelming gratitude to my family and friends who gave me constant support and motivation to continue with endeavor.

Sunny Kumar

Sunil Seghal

Sushil Singh Jamwal

Page 4: Project Report RAILWAY C

Sno. Topic page Title of project Introduction of Project Objectives Existing & proposed system Scope of the project

Proposed system

Advantages and disadvantages H/W& S/W requirement

Feasibility & System design Implementation & Testing Introduction of oops SDLC DFD’S

Flow Charts

Outputs

Conclusion Bibliography

INDEX OF THE FILE

Page 5: Project Report RAILWAY C

TITLE OF PROJECT

RAILWAY RESERVATION

Page 6: Project Report RAILWAY C

INTRODUCTION

A railway reservations system (RRS) is a computerized system used to store and retrieve information and conduct transactions related to rail travel. Originally designed and operated by railway lines, RRS were later extended for the use of travel agents; major RRS operations that book and sell tickets for multiple rail lines are known as global distribution systems (GDS). Railways have divested most of their direct holdings to dedicated GDS companies, who make their systems accessible to consumers through Internet gateways. Modern GDSes typically allow users to book hotel rooms and rental cars as well as railway tickets. A distributed database system consists of a collection of ‘sites’, connected together via some kind of communications network in which-

1. Each site is a database system site in its own right.

2. The sites have agreed to work together so that a user at any site can access data anywhere in the network exactly as if the data were all stored at the user’s own site.

A distribution Railway Reservation System stores the following information.

-The railway details

-Reservation Description

Design include:

i) The global schema, fragmentation schema, allocation schema.

ii) SQL commands for above queries/applications

iii) How the response for application 1 and 2 will be generated. Assuming these are global queries.

iv) Implement the database at least using a centralized database management system (make suitable adjustment in your design).

Page 7: Project Report RAILWAY C

OBJECTIVES OF THE PROJECT:

To meet the demands for reliable, economic and efficient Railway transport services through high standards of services to passengers and customers.

To carry out its activities on business principals and to participate in the growth of the nation’s economy

To maintain essential strategic communications with in India in times of national emergencies and to be a reliable second line of defense.

To provide highest level of safety in operations. To provide best levels of consumer satisfaction.

To achieve a high level of time performance.

To promote employee motivation & human resource development

The Ticketing department of the organization deals with the booking of tickets, cancellations, maintenance of passenger related information and the overall reservation procedures.

They have to take care of the availability of seats in a particular route, the preference of meal of a passenger, the passenger queries and other reservation related procedures

Page 8: Project Report RAILWAY C

The Existing System

The Computer Reservation System of the organization deals with reservation of the passenger. The booking for the tickets is done in three ways:

1) Directly by the passenger at the Indian Railways counter at the Railway Station.

2) Through the travel agents spread across the whole country.

3) Through the travel agents not residing within the country. In the third case the booking is done online. This does not take place directly, here the passenger first contact the agents then the agents come in contact with the Indian Railways server and then do the booking. A very crucial part is played by the agents. The Departure Control System stores and manages the data associated with departure of Train and the passengers Commuting through these train. The data stored includes train codes, date of departure, departure point, destination point, time of departure, passenger names, class of travel, passenger seat number, and many other attributes related to train and passengers.

However the scope of the assigned project was limited to a specific group of agents who book tickets for Indian railways either online or directly. The main objective of the program was to know how many booking was done by a particular agent on a given date. For this purpose a history CD was also supplied which contains data of 15 days

Page 9: Project Report RAILWAY C

which includes all the train history that is details of the passenger like their PNR number, which train they are supposed to board the destination of the passenger what time is the train suppose to departure, what time is it suppose to Arrival, whether the booking was done by the passenger itself or was it done by the agent, if it was done by the agent then his agent code and any special service request that the passenger has asked for. Before the commencement of this project, Indian railways had the data related to the through train history in the form of text files only. This project was conceived so as to design a code for these types of agents which would do the group booking for the Indian railways. With the help of this database, generation of specific reports indicating various patterns etc. could be done. Thus the need for developing a database for this task arose and gave rise to this project.

Page 10: Project Report RAILWAY C

OBJECTIVES THE EXISTING SYSTEM

Minimize repetitive work done by the system administrator and reservation clerks.

Maintain consistency among different access modes, e.g. by phone, by web, at the information desk and across different physical locations. The users should be basically taken through the same steps by the system as they go through in conventional desk-reservation systems.

Maintain customer information in case of emergency, e.g. Train cancellation due to inclement weather. The profile can also be used by the Indian railways to track user preferences and travel patterns to serve them better, plan routes, for better marketing and efficient scheduling of train.

Maximize the revenue of the railways company by various means:

Increase awareness among frequent travelers about various special offers and discounts.

Minimize the number of vacant seats on a train and maximize train capacity utilization.

Page 11: Project Report RAILWAY C

THE PROPOSED SYSTEM:

The new system has been designed to overcome the shortcomings of the existing system and to eradicate the problems faced by it.

The new system incorporates user-friendly screens and menus with proper navigation controls which help solve the problem of the system being not flexible enough.

It has a separate section for the passenger related queries where the user can search for the details of a specific passenger using his PNR number or search from a list of PNR numbers. In this manner the new system overcomes the shortcoming of the existing system by being able to provide complete passenger information in a efficient manner.

Apart from the section for passenger queries the new system also incorporates a general enquiry section which provides complete information about the train, fares and various discounts offered by the railways. This section handles the general enquiry related problems faced by the existing system in a clear and outlined way.

The new system stores all the cancelled entries in its database for a particular period of time .So unlike the existing system it will be able to provide information to the passengers about their cancellation related queries.

Page 12: Project Report RAILWAY C

The system will also keep a check on the entries where the passenger has provided a standby date for his booking. It will remind the passenger of his standby date on a regular basis.

Apart from the above mentioned features ,the new system will provide various reports like passenger reports, train reports, waiting lists and so on which will help the organization to keep a track of the departments functioning and thus enhance its performance in the aviation sector

The new system will thus provide a user-friendly environment to the ticketing agencies (agents) and independent travel agents.

It will serve as an interactive tool to generate unique PNR(Passenger reserving tickets and maintaining effective database of the ticketing department of the organisation.

Page 13: Project Report RAILWAY C

Drawbacks of the Existing System

More Time Consumption

A lot of time is wasted when we have to find some old records and it requires a lot of manual effort i.e. suppose we want to find the particular record of the flight in a particular period we have to search all. The records which is a time consuming process. Also the process of generation of Reports was time-consuming job.

Data Storage & Access

Data Storage becomes difficult, as the size of data grows large. Access of data is a time consuming and error prone task.

Reports Generation is very difficult

Time taken to produce various reports is considerable and requires a lot of effort, hence again a lengthy process. To produce the various reports it requires a lot of data to be processed manually.

More Error Prone

The present manual system is more error prone as thousands of records are searched to produce some important information reports. Problems like loss of data make the present system more error prone.

Page 14: Project Report RAILWAY C

ADVANTAGE OF THE PROPOSED SYSTEM

First of all it is faster and easy to maintain.

Almost no paper work is required.

More efficient and less likely to make any error.

Easy to obtain the required information without any inconvenience.

Facility to input the data efficiently and accurately.

Complete automation is provided.

Facility to update and modify the data stored in it.

Facility to provide detailed informative records.

Easy way of performing operation i.e to provide fast, easy and correct

information regarding examination management system.

Last but not the least it saves a lot of time, easy data storage and

money.

More user friendly.

Easy access

Page 15: Project Report RAILWAY C

SCOPE OF THE PROJECT

The system shall be designed according to the given specifications and requirements of the reservation system. It will be developed in such a way that each module will be self-contained and any of the single modules could be modified or new modules could be added without affecting the existing modules. According to need the system can be easily enhanced in future. Performance could be watched daily On the basis of requirement. The system will exhibit instantaneously with a click on the mouse.

(1) Least number of Papers, files and folders will be needed.

(2) Cumbersome process of maintenance of records will be avoided

(3) The information will also available on the website

(4) Extremely easy to monitor the daily performance.

Page 16: Project Report RAILWAY C

FEASIBILITY STUDY

An initial investigation culminates in a proposal that determines

whether an alternative system is feasible. A proposal summarizing the

thinking of the analyst is presented to the user for review. When

approved, the proposal initiates a feasibility study describes and

evaluates candidate systems and provides for the selection of the best

system that meets performance requirements.

To do a feasibility study , we need to consider the economic, technical

and behavioral factors in system development. First a project team is

formed. The team develops system flowcharts that identify the

characteristics of candidate systems , evaluate the performance of each

system, weigh system performance and cost data, and select the best

candidate system for the job. The feasibility study culminates in a final

report to management.

After the proposal is reviewed by management, it becomes a formal

agreement that paves the way for actual design and implementation .

This a crucial decision point in a life cycle. Many projects die here ,

whereas the more promising ones continue through implementation .

Changes in the proposal are made in writing , depending on the

complexity , size , and cost of the project . It is simply common sense

to verify changes before committing the project to design.

Page 17: Project Report RAILWAY C

SYSTEM ANALYSIS

After the System study , a detail analysis of all relevant aspects of

existing Systems is carried out . Failing problems , and bottlenecks are

analyzed after extensive data gathering . The findings are analyzed and

recording.

This system analysis start after the systems team has been given a go-

ahead by the management on the basis of feasibility report.

Analysis is actually the process of separating a whole into its parts

and examining them . Here the Systems analysts gathers facts

concerning a System, breaks these into elements . This analysis is done

using certain tools , which makes the process of analysis simpler . The

type of tools used includes:

System flowcharts.

Grid charts.

Decision Tables.

Decision Trees.

Data Flow Diagrams.

Structure Charts.

Page 18: Project Report RAILWAY C

Analysis of the existing System provides the clear idea of the current

System both physically and logically . The process of analysis basically

constitutes:

Understanding the existing system.

Understanding the problems, bottlenecks and requirements.

Defining a new ‘proposed system’.

BACKGROUND ANALYSIS

Once the system is initiated, the analyst begins to learn about the

setting, the existing system, and the physical processes related to the

revised system.

The analyst should prepare an organization chart with a list of the

functions and the people who perform them.

After obtaining this background knowledge , the analyst begins to

collect data on the existing system’s outputs , inputs , and costs . The

tools used in data collection are: ---

Review of written documents,

On-site observations,

Interviews , and

Questionnaires.

Page 19: Project Report RAILWAY C

SYSTEM DESIGN

The starting point of design is the completion of the systems

requirement specification prepared during the analysis phase.

The outputs are then detailed-these include reports , files to other

systems, data extractions, etc. Processing to be done and the inputs are

also detailed in the design phase along with the file/database. Operating

instructions and user instructions are developed. The full system is

segmented into programs and modules and these are then specified in

detail . Related manual systems, procedures and forms are designed as

part of this phase.

Currently, there are various approaches and tools available for system

design. The designer has to decide his / her overall approach for

designing and select the tools and techniques to be used .

Page 20: Project Report RAILWAY C

Traditionally, the system flowcharts formed the starting point. Output and

input formats are depicted on layout charts or validation with the

users. Process descriptions could be written as narrative or be

documented as decision trees, decision tables and charts .

With the advent of structured techniques, data flow diagrams are used.

Processes are described using decision trees, decision tables, structured

English etc. The data dictionary is used to document the data elements

and data structures centrally for a system . Data dictionary also helps in

the standardization of data names in a system .

Structure charts are used to depict the structure of the system and the

modules.

One approach to design and developing a system is top-down approach.

Here the detailed picture is obtained by successive refinements of the

overall pictures . This is a structured approach and is less likely to

give rise to problems of integration . An example of this can be seen

in the way Data Flow Diagrams (DFDs) are developed for a system .

The first DFD drawn is top-level DFD where the entire system is

depicted as a single process and the emphasis is on depicting all

entries it interacts with , and the relationship of the entities with the

system . The next level DFD explodes this process into component

processes and subsequent level further blow up the components

processes into their components until the system is depicted to a

detailed level . The other approach , the bottom-up

Page 21: Project Report RAILWAY C

approach proceeds the other way . This approach is not and cannot

work unless the designer has an idea of what the top-level system

should be like anyway.

An important aspect of design is the documentation to be produced .

Several important decisions are made when design and details are

being developed . All these need to be clearly , completely and

unambiguously documented so these subsequent phases can proceed

successfully.

As soon as the system proposal is accepted by the user , work can start

on preparing the system specification . The detail of the input

transactions , the detail of the printed reports, screens and the other

outputs , the file or database structure , the contents of the records, the

processing required and the efficiency of the system from a computer

processing point of view.

IMPLEMENTATION & TESTING

A. IMPLEMENTATION

Implementation is the stage of the project when the theoretical design

is turned into a working system . At this stage the main workload , the

greatest upheaval and the major impact on existing practices shifts to

the user departments. If the implementation stage is not carefully

Page 22: Project Report RAILWAY C

planned and controlled , it can cause chaos . Thus it can be considered

to be the most crucial stage in achieving a successful new system and

in giving the users confidence that the new system will work and be

effective.

The implementation stage is a system project in its own right. It

involves careful planning, investigation of the current system and its

constraints on implementation, design of methods to achieve the

changeover procedures ( as well as in the new system procedures ), and

evaluation of changeover methods.

The more complex the system being implemented, the more involved

will be the systems analysis and design effort required just for

implementation. Indeed in large organizations systems analysts may

specialize in implementation system activities.

TASKS OF IMPLMENTATION

There is no. of tasks involved in the implementation process. The first task is

implementation planning, i.e. deciding on the methods and timescale to be

adopted. Once the planning has been completed, the major effort in the

Page 23: Project Report RAILWAY C

system is working properly. At the same time the user department must

concentrate on training user staff. When the staff have been trained a

full system test can be carried out, involving both computer and

clerical procedures. Planning, training and testing are the preparatory

activities of implementation.

Once the preparation is completed, implementation proper can begin. The

first part of this involves the conversion of existing clerical files to

computer media and the setting up of these files as they are

converted on the computer. Then the actual changeover from the

existing system to the new system takes place.

Finally , when the changeover has taken place, there will be need for

amendments to correct or improve the system .

SYSTEM TESTING

System testing is the stage of implementation, which is aimed at

ensuring that the system works accurately and efficiently before live

operation

commences. In principle, system providing is an on-going activity

throughout the project. The logical design and the physical design

should be thoroughly and continually examined on paper to ensure

that they will work when implemented. Thus the system test in

implementation should be a confirmation that all is correct and an

opportunity to show the users that the system works. when the

programmers have tested each program individually, using test data

designed by themselves, and have verified that these programs link

together in the way specified in the computer run chart to produce the

output specified in the program suite specification, the complete system and

Page 24: Project Report RAILWAY C

its environment must be tested to the satisfaction of the system’s

analyst and the user.

The system analyst will provide the test data ; specially designed to

show that the system will operate successfully in all its aspects and

produce expected results under expected conditions. The tests should

take place as far as possible in the actual operating environment and

they should test people and equipment as well as programs. Where

this is not possible, the system should be tested in a simulated

operational environment to prove that the computer and the clerical

procedures are understood and produce the required results. Sometimes

it is convenient to use live data from a previous system cycle, but

this presupposes that the new files have been set up and can be used.

Preparations of test data and checking of results should be carried out

in conjunction with the appropriate user and operation departments.

The Software testing is performed in the following steps:-

Unit testing :-

In the unit testing each module is tested for its correctness, validity

and any missing operations. It is also verified that all objectives are met.

All errors are specified in order to correct them as soon as possible.

Integration testing:-

It need not be sure that a software whose modules when run

individually and showing perfect results will perform perfectly when

run as a whole. This is due to poor integration, which may result in

data being lost across an interface. A module can have inadvertent and

Page 25: Project Report RAILWAY C

adverse effect on any other or on the global data structure, causing

serious problems.

Acceptance testing:-

User acceptance of the system is the key factor for the success of

any system. This system under consideration is tested in touch

perspective system users at the time of development and making

changes whenever required .

Validation testing:-

It determines whether the software functions as user expected. Here also

some modifications were made. Even though a comprehensive test is

carried out on the software, it may not be possible to detect all the

errors show in the course of time, can be corrected through

maintenance .

Page 26: Project Report RAILWAY C

INTRODUCTION OF OOPS

Objects –oriented programming (OOP) is the most dramatic innovation in software development in the last decade .It ranks in importance with the development of the first higher level languages at the dawn of the computer age .Sooner or later every programmer will be affected by the object-oriented approach to program design.

BENEFITS OF OOPS

In oops a program is a collection of largely autonomous agents called objects.

It reduce the interdependency among software components and permits a development of reusable software system.

Object-oriented programming do not allow unauthenticated user to read the data ,so it implies security feature .

Page 27: Project Report RAILWAY C

OOP allocate the computer memory only at the time of execution and release memory immediately after execution unlike procedural programming.

Why is everyone so excited about OOP ?

The chief problem with computer programs is complexity. Large programs are probably the most complicated entities ever created by humans Because of this complexity, programs are prone to error, and software errors can be expensive and even life-threatening. Objects-oriented programming offers a new and powerful way to cope with this complexity. Its goal is clearer, more reliable ,more easily maintained programs.

The c in statement is used to input data from keyboard and cout statement to output or display data on VDU screen. Thus, whenever some data is required in a program it tries to read from the keyboard. The keyboard is an extremely slow device. For small amount of data , this method of input works well. But what happens when huge data is needed by a program? For example it generates the merit list of JEE may require data in the tune of 10000 to 20000 records . It is not possible to sit down and type such a large amount of data in one go. Another interesting situation is: what happens when data or results produced by one program are required subsequently by another program? On the next day the results may even be required by the program that produced them. Therefore, we need to have a mechanism such as files by virtue of which the program can read data from or write data on magnetic storage medium.

LANGUAGES AND DEVELOPMENT PLATFORM

Of the object-oriented programming languages, C++ is by far the most popular; and, if you want to learn C++ and its higher-price cousin, Borland C++.These products provide a complete ,easy-to-ease development environment. They are also among the best platforms for professional software developers.

Page 28: Project Report RAILWAY C

NEW CONCEPTS

OOP involves concepts that are new to programmers of traditional languages such as Pascal, Basic and C. These ideas , such as data hiding, encapsulation, polymorphism, lie at the heart of object-oriented programming . But it’s easy to lose sight of these concepts when discussing the specifies of an object-oriented language.

WHY DO WE NEED OBJECT ORIENTED PROGRAMMING

Object-oriented programming was discovered in earlier approaches to programming. To appreciate what OOP does, we need to understand what these limitations are and how they arose from traditional programming languages.

PROCEDURAL LANGUAGES

Pascal, C, BASIC, FORTAN, and similar languages are procedural languages. That is, each statement in the language tells the computer to

Page 29: Project Report RAILWAY C

do something: Get some input, and these numbers divide by 6 ,display that output . A program in a procedural language is a list of instructions.

For very small programs no other organizing

principle ( often called paradigm) is needed.

DIFFERENCE BETWEEN PROCEDURAL AND OOP PROGRAMMING

1. Procedural language such as Pascal , Fortan ,C etc use function in programming , where one function calls another .

2. Object oriented programming consists of a number of objects which communicate with each other by calling one another member’s member functions .In procedural language we access data directly .

3. In object oriented language we cannot access data , because data is hidden .

4. In procedural language variables are stored in structure and functions are declared separately .

5. In objects oriented language both dat and functions that operate on that dat are combined into a single unit known as object.

Page 30: Project Report RAILWAY C

FEATURE OF C++

CLASSES

OBJECTS.

INHERITANCE.

POLYMORPHISM.

DATA ENCAPSULATION.

FUNCTION OVERLOADING

OPERATOR OVERLOADING.

DATA HIDING.

DYNAMIC BINDING

CONSTRUCTORS AND DESTRUCTORS.

Page 31: Project Report RAILWAY C

OPP AN APPROACH TO ORGANIZATION

Keep in minds that object –oriented programming is not primarily concerned with the details of program operation. Instead , it deals with the overall organization of the program. Most individual program statements in C++ are similar to statements in procedural languages , and many are identical to statements in C. Indeed entire member function in a C++ program may be very similar to a approach to a procedural function in C. It is only when you look at the larger context that you can determine whether a statement or a function is part of a procedural C program or an object-oriented C++ program.

CHARACTERISTICS OF OBJECT ORIENTED LANGUAGES

Let’s briefly examine a few of the major elements of object-oriented languages in general and C++ in particular.

Page 32: Project Report RAILWAY C

OBJECTS

When you approach a programming problem in an object-oriented languages you no longer ask how the problem will be divided into functions, but how it will be divided into objects, rather than functions, has a surprisingly helpful effect on how easily programs can be designed. This results from the close match between objects in the programming sense and objects in the real world.

What kinds of things become objects in object-oriented programs? The answer to this is limited only by your imagination, but here are typical categories to start you thinking:

Physical Objects . Automobiles in a traffic- flow simulation

. Electrical components in a circuit- design program

. Countries in an economics model

. Aircrafts in an air – traffic – control system

Elements of the computer-user environment modeled exists in a procedural languages.

. Windows

. Menus

. Graphics objects (lines, rectangles , circle)

. The mouse and the keyboard

Page 33: Project Report RAILWAY C

Programming constructs . Customized arrays

. Stacks

. Linked lists

. Binary trees

Collection of data . An inventory

. A personnel file

. A dictionary

. A table of the latitudes and longitudes of world cities

User- defined data types . Time

. Angles

. Complex numbers

. Points on the plane

Components in computer games . Ghosts in a maze games

. Positions in a broad game (chess, checkers)

. Animals in an ecological simulation

. Opponents and friends in adventure games

The match between programming objects and real-world objects is the happy results of combining data functions: The resulting objects offer a revolution in program design. No such close match between programming constructs and the items be.

Page 34: Project Report RAILWAY C

CLASSES

In OOP we say that objects are members of classes. What does this mean?

Let’s look at an analogy. almost all computer languages have built-in data types. for instance, a data type int, meaning integer is predefined in C++. You can declare as many variables of type int as you need in your program.

Int day;

Int count;

Int divisor;

In a similar way, you can define many objects of any variables.

A class is thus a collection of similar objects . This fits out non-technical understanding of the word class. Prince , sting and Madonna are members of the class of “rock musician”, but specific people with specific names are members of this class if they possess certain characteristics.

INHERITANCE

Page 35: Project Report RAILWAY C

The idea of classes leads to the idea of inheritance. In our daily lives, we use the concept of classes, we use the concept of classes being divided into subclasses. We know that the class of animals is divided into mammals, amphibians, insects, birds, and so on .

The class of vehicles is divided into cars , trucks, buses, and motorcycles.

CREATING NEW DATA TYPES

One of the benefits of objects is that they give the programmer a convenient way to construct new data types. Suppose you work with two –dimensional position(such as X and Y coordinates, or latitude and longitude) in your program you would like to express operations on these positional values with normal arithmetic operations, such as

Position1 = position2 + origin

Where the variables position1, position2 and origin each represent a pair of independent numerical quantities. By creating a class that incorporates these two values, and declaring position1, position2 and origin to be objects of this class ,we can , in effect , create a new data type . Many features of C++ are intendent to facilitate the creation of new data types in this manner.

Page 36: Project Report RAILWAY C

POLYMORPHISM AND OVERLOADING

Note that the =(equal) and +(plus) operators, used in the position arithmetic shown above, don’t act the same way they do in operations on built-in types like int . The objects position1 and so on are not predefined in C++,but are programmer –defined objects of class position .How do the = and + operators know how to operate on objects? The anwera is that we can define new operations for these operators .These operators will be the members functions of the position class.

Using operators or functions in different ways, depending on what they are operating on, are called polymorphism(one thing with several distinct forms).When an existing operator, such as + or =,is given the capability to operator on anew data type, it is said to be overloading is a kind of polymorphism; it is also an important feature of OOPS

SOFTWARE SECURITY

The term system security describes the physical protection of computer hardware ,tape reels, disk packs source documents as well as as the

Page 37: Project Report RAILWAY C

logical protection of the computer files and programs. There are instances where kids electronically break into computer .

PHYSICAL SECURITY

Computer equipment and files are valuable physical assets that should be protected.

Four general safeguards include:

1. Locating the computer in a safe place.2. Protecting computer files.3. Protecting computer rooms.

Physical danger includes fire, flood, tidal wave, earthquake and tornadoes. The computers must be located away from the boilers, urnance, fuel storage, heavy engineering centers etc.

Page 38: Project Report RAILWAY C

SOFTWARE ENGINEERING PARADIGM

(SOFTWARE PROCESS)

The process model applied in the development of Student Library Database is Incremental Model. This model combines elements of the waterfall in an iterative fashion. The incremental model delivers a series of releases, called increments that provide progressively more functionality to customers as each increment is delivered. This model is useful when less manpower is available for software development and the release deadlines are tight. It is best suited for in-house product development, where it is ensured that the user has something to start with.

Requirement Analysis

System Design

Object Design

Coding

Testing

Increment # N

Delivery of nth increment

Maintenance

Page 39: Project Report RAILWAY C

SYSTEM DEVELOPMENT LIFE

CYCLE

Increment # 1

Increment # 2

Delivery of 1nd Incr..

Delivery of 2nd Incr.

Incremental Software Development Model

Requirement analysis

Initial requirement specification

Feasibility study

System implementation

System design

System specifications

System evaluation

Hardware study

System modification & maintenance

Revised requirement specifications

User requirements

Feasibilty study

Testing

Budget and schedule

Config. DataSystem

Revised requirements

Improved system

Decision to design the system

Page 40: Project Report RAILWAY C

DATA FLOW DIAGRAM

Page 41: Project Report RAILWAY C

ALGORITHM DIAGRAM

Accept Choice

A

Do New Reservat. Proc

Is Choice equal to 1

Is Choice equal to 2

Do Cancel Reservat. Proc

Is Choice equal to 3

Process Edit Options Menu

Y

Y

Y

N

N

N

Is Choice equal to 4

Process Report

Options Menu

Y

N

Is Choice equal to 5

N

Y

C

Display Error Message

Stop

Page 42: Project Report RAILWAY C

Data Structures’ Description

This project named “Passenger Reservation System For Railways” has been developed using C language. So it makes use of different Structures in the project’s coding and implementation. The detailed description of the various structures used in the project is as under:

Name of Structure Data Members Purpose

Route R no

(Uniue Code for Route)

Src (Source)

Dest (Destination)

t name (Train Name)

Used for keeping a record of the train route for addition or deletion from the routes database file.

Res Tic no

(Unique Ticket Number)

R no (Route No.)

age

name

address

amount

dd, mm, yy

(for date values)

Used for keeping a record of the reservation made by customer or passenger for a specific route for addition or deletion purposes.

Data Files Maintained:

routes.dat: Maintained for the purposes of storing routes information of different airways companies as a database.

res.dat: Maintained for the purposes of storing reservations information of various customers/passengers for these train routes.

Page 43: Project Report RAILWAY C

Modules’ Description

The complete description of the different modules (Functions and Procedures) used for carrying out different activities by the system are as under:

Name of Module Description

Add New Route Used for adding a new route in the routes database file

Get Last Tic no Used for generating a new ticket number

Find Route Used for searching existing route code

Find Tic no Used for searching a particular ticket number

Check Date Used for verifying a valid date

Main_Menu Used for displaying the main menu options

Edit_Menu Used for displaying the edit menu options

Reports_Menu Used for displaying various reporting options

Get Last Rno Used for generating a new route code

Make New Res Used for making a new passenger reservation

Cancel Res Used for canceling an existing reservation

Disp Res Info Used for generating reservation list for a specific date

Disp Routes Info Used for displaying various routes information

Delete Route Used for deleting a train route record from the database

Project Output Screens

Page 44: Project Report RAILWAY C

Main Menu

Page 45: Project Report RAILWAY C

New Route Addition

Page 46: Project Report RAILWAY C

New Reservation Addition

Page 47: Project Report RAILWAY C

Deleting Route Record

Page 48: Project Report RAILWAY C

Edit/Modification Options

Page 49: Project Report RAILWAY C

Various Reports Menu

Page 50: Project Report RAILWAY C

Reservation List

Page 51: Project Report RAILWAY C

TESTING

“To err is human” however accomplished a developer may be but it is

nearly impossible to make a bug free software. Thus testing is very

important for the success of a system.

“Purpose of testing activity is to verify that the software satisfies the specified requirements.”Software testing is the process of testing the software product with the intent of finding an error. It is a critical element of software quality assurance and represents the ultimate review of specification, design and code generation.

During earlier software engineering activities, the engineer attempts to build software from an abstract concept to a tangible product. Now comes testing. The engineer creates a series of test cases that are intended to “demolish” the software that has been built. In fact, testing is the one step in the software process that could be viewed (psychologically, at least) as destructive rather than constructive. Testing requires that the developer discard preconceived notions of the “correctness” of software just developed and overcome a conflict of interest that occurs when errors are uncovered.

Effective software testing will contribute to the delivery of high quality software products, more satisfied users, lower maintenance costs, and more accurate and reliable results. Hence, software testing is necessary and important activity of the software development process. It is a very expensive process and consumes one-third to one-half of the cost of a typical development project.

Glen Myers states a number of rules that can serve as testing objective:

Testing is a process of executing a program with the intent of finding an error.

A good test case is one that has a high probability of finding an as-yet- undiscovered error.

A successful test is one that uncovers an as-yet-undiscovered error.The basic principles that guide software testing, according to Davis are as follows:

Page 52: Project Report RAILWAY C

All tests should be traceable to customer requirements. Tests should be planned long before testing begins. The Pareto principle applies to software testing. Stated simply, the

Pareto principle implies that 80 percent of all errors uncovered during testing will likely be traceable to 20 percent of all program components.

Testing should begin “in the small” and progress toward “in the large”.

Exhaustive testing is not possible. To be most effective, an independent third party should conduct

testing.

TESTING TECHNIQUES

Once source code has been generated, software must be tested to uncover (and correct) as many errors as possible before delivery to your customer. The goal is to design a series of test cases that have a high likelihood of finding errors. The Software Testing 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.

During early stages of testing, a software engineer performs all tests, however, as the testing process progresses, testing specialists may become involved.

Reviews and other Software Quality Assurance activities can and do uncover errors, but they are not sufficient. Every time the program is executed, the customer tests it. Therefore, we have to execute the program before it gets to the customer with the specific intent of finding and removing all errors. In order to find the highest possible number of errors, tests must be conducted systematically and test cases must be designed using disciplined techniques.

Page 53: Project Report RAILWAY C

TEST CASE

The essence of software testing is to determine a set of test cases for the item being tested. A test case has an identity, and is associated with program behavior. A successful test case unearths an undiscovered error. A test case has a set of inputs, a list of expected outputs. Inputs are of two types: pre-conditions (circumstances that hold prior to test case execution) and the actual inputs that are identified by some testing methods. Expected outputs are also of two types: Post conditions and Actual outputs.

There are two fundamental approaches to identifying the test cases; these are known as functional and structural testing. Each of these approaches has several distinct test case identification methods more commonly called Testing Methods.

Functional Testing

Functional testing refers to testing, which involves only observation of the output for certain input values, and there is no attempt to analyze the code, which produces the output. The internal structure of the program is ignored. For this reason, functional testing is sometimes referred to as the black box testing in which the content of a black box is not known and the function of black box is understood completely in terms of its inputs and outputs.In structural/white box testing, test groups must possess complete knowledge about the internal structure of the source code. The knowledge of the internal structure of source code can be used to find the number of test cases required to guarantee a given level of test coverage.

Page 54: Project Report RAILWAY C

Testing Strategies

A strategy for software testing integrates software test case design methods into a well-planned series of steps that result in the successful construction of software. The strategy provides a road map that describes the steps to be conducted as part of testing, when these steps are planned and then undertaken, and how much effort, time and resources will be required. Therefore, any testing strategy much incorporates test planning, test case design, test execution, and resultant data collection and evaluation. Considering the process from a procedural point of view, testing within the context of software engineering is actually a series of four steps that are implemented sequentially. The steps are as following: -

Unit Testing Integration Testing Top-down Integration Bottom-up Integration Regression Testing Smoke Testing Validation Testing Alpha Testing Beta Testing System Testing Recovery Testing Security Testing Stress Testing Performance Testing

Page 55: Project Report RAILWAY C

System Testing

The importance of software testing and its implications with respect to software quality cannot be overemphasized. 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 (and correct) as many errors as possible before implementation. Every time the program is executed, it is tested.

For the testing of the project, we have followed the following two major testing methods:

White box testing Black box testing

White box tests will focus on program control structure. Test cases will be derived to ensure that all statements in the coding of pages have been executed at least once during testing and that all logical conditions have been exercised.

Black box tests will be designed to validate functional requirement without regard to the internal workings of the project. Black box testing techniques will focus on the information domain of the project, deriving test cases by partitioning the input and output domain of the project in a manner that provides thorough test coverage. Although testing is done after the designing, but testing has also been done simultaneously along with designing and coding.

Page 56: Project Report RAILWAY C

POST IMPLEMENTATION AND MAINTANACE

After the installation phase is completed and the user staff is adjusted to the changes created by the candidate system, evaluation and maintenance begin. Like any system, there is an aging process that requires periodic maintenance of hardware and software. If the new information is inconsistent with the design specifications, then changes have to be made. Hardware also requires periodic maintenance to keep in tune with design specifications. The importance of maintenance is to continue to bring the new system to standards.

SOFTWARE MAINTANANCE

Once a system has been installed and is fully operational, the systems

maintenance task looms large. It is generally assigned to a systems and

programming group consisting of maintenance programmers. Thus the

responsibility gets transferred from a systems development team to a

maintenance programming team.

Systems maintenance involves keeping the software operational i.e.

undertake preventive measures to keep computer programs current, monitor

and fix problems with computer programs in response to new user

requirements. Thus, since part of a system has to be modified rather than the

entire system, maintenance activities resemble miniature systems

development efforts.

Systems Maintenance that are considered during the development of the

system

Adaptive Maintenance Corrective Maintenance Perfective Maintenance

Page 57: Project Report RAILWAY C

CONCLUSION

I now have a thorough knowledge of installing different software, their requirements (as a majority of them were needed by us for making the project and were installed personally by us). At present I have a thorough knowledge of C++,File handling and graphics . I was exposed to the practical knowledge of how the Software Development Life Cycle is actually implemented. I came to know how different parts of the project are handled, how the different phases are followed and the importance of each phase. I have gained confidence by working on the project allotted as I came to know a number of practical things that were not clear by the theoretical concepts studied in my degree, previously.

Page 58: Project Report RAILWAY C

BIBLOGRAPHY

Programming with C++:-By E.Balagurusamy.

Let us C++:-By Yashavant Kanetkar.

Introduction to C++ :-By Preeti Gehlot and Charu Gupta.

Object oriented programming using C++ :-By Robert Lafore.

Thinking in C++:- By Mahapatra.

Applying C++ :- By Scott Robert.

Page 59: Project Report RAILWAY C