SlideShare a Scribd company logo
COMPUTER SCIENCE
PROJECT
A Project Report On:
Railway ticket ReseRvation
Submitted by:
VIRAT PRASAD
ROLL NO.:-
Class : XII ‘A’
SESSION- 2016-17
Under the Guidance of:
Mr. MANOJ KUMAR
PGT (Computer Science)
Department of Computer Science
Kendriya Vidyalaya, NTPC, Kahalgaon
INDEX
01. CERTIFICATE OF EXCELLENCE
02. ACKNOWLEDGEMENT
03. AIM OF PROJECT
04. INTRODUCTION
05. HEADER FILES USED
06. FILES GENERATED
07. CODING
08. OUTPUT
09. BIBLIOGRAPHY
CERTIFICATE
This is to certify that VIRAT PRASAD, a
student of class XII-‘A’ has successfully
completed the research on the mentioned
topic under the guidance of Mr. Manoj
Kumar (PGT C.S.) during the academic year
2016-17 in partial fulfilment of physics
practical examination conducted by AISSCE,
New Delhi.
Signature of External Examiner Signature of Physics Teacher
ACKNOWLEDGEMENT
In the accomplishment of this project successfully, many
people have best owned upon me their blessings and the
heart pledged support, this time I am utilizing to thank all
the people who have been concerned with the project.
Primarily, I would thank God for being able to complete
this project with success. Then I would like to thank my
Physics teacher Mr. Kumar Rajesh, whose valuable
guidance has been the ones that helped me patch this
project and make it full proof success. His suggestions
and his instructions have served as the major contributor
towards the completion of the project.
Then I would like to thank my parents and friends who
have helped me with their valuable suggestions and
guidance that has been helpful in various phase of the
completion of the project.
Last but not least, I would like to thank my classmates
who have helped me a lot.
AIM OF THE PROJECT
TO DESIGN A PROGRAM
FOR RAILWAY TICKET
RESERVATION
INTRODUCTION
This program consists of FIVE options as
follows :
1. TO ADD NEW RAILWAY STATION
2. TO BOOK TICKET
3. TO CHANGE PER KM RATES
4. TO MODIFY DATABASE OF TRAIN
5. TO EXIT
HEADER FILES USED
FSTREAM.H – for file handling, cin & cout
PROCESS.H – for exit() function
CONIO.H – for clrscr() & getch() function
STDIO.H – for standard I/O operation
MATHS.H –for doing mathematical operations
FILES GENERATED
DATA FILE
TRAIN.DAT
PROGRAM FILE
RAILWAY TICKET RESERVATION.CPP
OBJECT FILE
TRAIN.EXE
EXECUTION FILE
TRAIN.EXE
CODING
//Indian Railways - Ticket Reservation
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<process.h>
char from[30],to[30];
void detail()
{
cout<<"From"<<endl;
gets(to);
cout<<"To"<<endl;
gets(from);
}
class railways
{
char station[30];
unsigned int distance;
float fare;
public:
void ad_data()
{
cout<<"Enter Railway Station name"<<endl;
gets(station);
cout<<"enter its distance from Jammu
Tawi"<<endl;
cin>>distance;
}
void amount(int a,int b,int c)
{
cout<<"total distance="<<fabs((a-b))<<"ncharges
per/km="<<c;
fare=fabs((a-b))*c;
cout<<"nticket cost ="<<fare;
}
unsigned int dist()
{
return distance;
}
char* station_v()
{
return station ;
}
void modify()
{
cout<<"nEnter new railway stationn";
gets(station);
cout<<"nenter its distance from jammu tawin";
cin>>distance;
}
}tr;
void main()
{
clrscr();
unsigned int per_km=5,choice, d1=0,d2=0,i;
char station_searched[30];
while(1)
{
clrscr();
cout<<"ntttWELCOME TO INDIAN
RAILWAYSn";
for(i=0;i<80;i++)
{
cout<<"-";
}
cout<<"Enter your choice nt1:->Add new
railway stationnt2:->Book ticket"<<endl;
cout<<"t3:->Change per km ratesnt4:->modify
database of trainnt5:->exitn";
for(i=0;i<80;i++)
{
cout<<"-";
}
cin>>choice;
while(choice==1)
{
ofstream of1("train.dat",ios::binary|ios::app);
tr.ad_data();
of1.write((char*)&tr,sizeof(tr));
of1.close();
break;
}
while(choice==2)
{
ifstream of1("train.dat",ios::binary);
detail();
while(of1)
{
of1.read((char*)&tr,sizeof(tr));
if(0==stricmp(from,tr.station_v()))
{
d1=tr.dist();
}
if(0==stricmp(to,tr.station_v()))
{
d2=tr.dist();
}
if(d1 && d2)
{
tr.amount(d1,d2,per_km);
getch();
break;
}
if(of1.eof())
{
cout<<"nstations not found check your
spellingn";
getch();
}
}
of1.close();
break;
}
if(choice==3)
{
cout<<"Enter new per km rates";
cin>>per_km;
}
if(choice==4)
{
cout<<"enter the railway station to be changed";
gets(station_searched);
ifstream f1("train.dat",ios::binary);
while(f1 )
{
f1.read((char*)&tr,sizeof(tr));
long pos=f1.tellg();
if(0==strcmp(station_searched,tr.station_v()))
{
f1.seekg((-1*sizeof(tr),ios::cur));
tr.modify();
f1.close();
ofstream f1("train.dat",ios::app);
f1.seekp(pos,ios::beg);
f1.write((char*)&tr,sizeof(tr));
cout<<"record modified";
f1.close();
break;
}
else if(f1.eof())
{
cout<<"nStation not foundn";
getch();
}
}
}
if(choice==5)
{
cout<<"nTHANK YOU FOR USING INDIAN
RAILWAYS ";
getch();
exit(0);
}
if(choice!=1&&choice!=2&&choice!=3&&choice!=4
&&choice!=5)
{
cout<<"entered wrong choice PROGRAM IS
ABORTING!!!!!!";
getch();
exit(0);
}
}
getch();
}
OUTPUT
1. WELCOME SCREEN
2. ADD NEW RAILWAY
STATION
3. TO BOOK TICKET
4. TO CHANGE PER K.M.
RATE
5. TO MODIFYDATABASE OF TRAIN
6. TO EXIT
Bibliography
1. http://www.google.com/
2. http://en.wikipedia.org
3. Computer Science with C++ by Sumita
Arora
4. Object Oriented Programming by Robert
Lafore
5. www.bOtskOOL.com
6. www.slideshare.com

More Related Content

PPT
Comparing numbers up to 1000
PDF
Investigatory Project on Aids
PDF
Library management system
PDF
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
PDF
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
DOCX
cbse 12th chemistry investigatory project
PPTX
Railway booking & management system
DOCX
Online Railway Reservation System
Comparing numbers up to 1000
Investigatory Project on Aids
Library management system
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
cbse 12th chemistry investigatory project
Railway booking & management system
Online Railway Reservation System

What's hot (20)

DOCX
CS Project on Railway Tickect Reservation for class 12
DOCX
computer science with python project for class 12 cbse
PDF
Computer project final for class 12 Students
DOCX
Online railway reservation system
PDF
Railway reservation(c++)
PDF
Computer Science Investigatory Project Class 12
DOCX
Tour and travel project report front page
DOCX
RAILWAY RESERVATION CS INVESTIGATORY
DOCX
cbse 12 computer science IP
PPTX
Student result mamagement
PDF
Computer science Project for class 11th and 12th(library management system)
RTF
Railway Reservation Documentation
DOCX
12th CBSE Computer Science Project
DOCX
Online bus ticket booking
DOCX
class 12th computer science project Employee Management System In Python
DOCX
cbse 12 computer science investigatory project
PDF
Computer science class 12 project on Super Market Billing
DOCX
Project for Student Result System
DOCX
Online final report
DOCX
CBSE Class 12 Computer practical Python Programs and MYSQL
CS Project on Railway Tickect Reservation for class 12
computer science with python project for class 12 cbse
Computer project final for class 12 Students
Online railway reservation system
Railway reservation(c++)
Computer Science Investigatory Project Class 12
Tour and travel project report front page
RAILWAY RESERVATION CS INVESTIGATORY
cbse 12 computer science IP
Student result mamagement
Computer science Project for class 11th and 12th(library management system)
Railway Reservation Documentation
12th CBSE Computer Science Project
Online bus ticket booking
class 12th computer science project Employee Management System In Python
cbse 12 computer science investigatory project
Computer science class 12 project on Super Market Billing
Project for Student Result System
Online final report
CBSE Class 12 Computer practical Python Programs and MYSQL
Ad

Viewers also liked (10)

PDF
Ecuaciones quimicas
PDF
Training en coaching
PDF
Financial software
PDF
Procesoptimalisatie
PPTX
Sample Presnetation for Website Development Project
DOCX
WORD FORMAT PROJECT REPORT ON VARIOUS MECHANICAL UNITS INVOLVED IN THE BOTTLI...
PPT
railway reservation software documentaion
PPTX
Paytm aman
PDF
clinic database and software management system
PPT
Report Writing - Conclusions & Recommendations sections
Ecuaciones quimicas
Training en coaching
Financial software
Procesoptimalisatie
Sample Presnetation for Website Development Project
WORD FORMAT PROJECT REPORT ON VARIOUS MECHANICAL UNITS INVOLVED IN THE BOTTLI...
railway reservation software documentaion
Paytm aman
clinic database and software management system
Report Writing - Conclusions & Recommendations sections
Ad

Similar to C.S. project report on railway ticket reservation (20)

PDF
The railway ticket service c++ project class 12
DOCX
Computer science project
DOCX
Dhananjay_Mishra
PDF
himani 2
DOCX
Report Card making BY Mitul Patel
PDF
resume_new.PDF
PDF
KUMARPAWAN (2)-1-1.pdf
DOCX
Use of network scheduling technique
PDF
Presentation of Turbo C++ || Railway Reservation System project || B.Sc. student
DOC
CV-ketan salunke
DOC
CV-ketan salunke
PDF
Online_Examination
PDF
Opps manual final copy
PDF
OOPs manual final copy
PDF
Travel speed report by pronob ghosh buet 1204011
PDF
Product Engineer Certified Lean Six Sigma Black Belt by IASSC
DOCX
kishore resume - Copy
DOCX
Project.12
PDF
IRJET- College Campus Event Management System
PDF
Prof Chethan Raj C, Final year Project Report Format
The railway ticket service c++ project class 12
Computer science project
Dhananjay_Mishra
himani 2
Report Card making BY Mitul Patel
resume_new.PDF
KUMARPAWAN (2)-1-1.pdf
Use of network scheduling technique
Presentation of Turbo C++ || Railway Reservation System project || B.Sc. student
CV-ketan salunke
CV-ketan salunke
Online_Examination
Opps manual final copy
OOPs manual final copy
Travel speed report by pronob ghosh buet 1204011
Product Engineer Certified Lean Six Sigma Black Belt by IASSC
kishore resume - Copy
Project.12
IRJET- College Campus Event Management System
Prof Chethan Raj C, Final year Project Report Format

Recently uploaded (20)

PDF
Sports Quiz easy sports quiz sports quiz
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Types and Its function , kingdom of life
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
RMMM.pdf make it easy to upload and study
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Lesson notes of climatology university.
PDF
Classroom Observation Tools for Teachers
PPTX
master seminar digital applications in india
PDF
Pre independence Education in Inndia.pdf
Sports Quiz easy sports quiz sports quiz
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Anesthesia in Laparoscopic Surgery in India
Cell Types and Its function , kingdom of life
Supply Chain Operations Speaking Notes -ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
RMMM.pdf make it easy to upload and study
O7-L3 Supply Chain Operations - ICLT Program
PPH.pptx obstetrics and gynecology in nursing
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
102 student loan defaulters named and shamed – Is someone you know on the list?
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Microbial diseases, their pathogenesis and prophylaxis
Lesson notes of climatology university.
Classroom Observation Tools for Teachers
master seminar digital applications in india
Pre independence Education in Inndia.pdf

C.S. project report on railway ticket reservation