SlideShare ist ein Scribd-Unternehmen logo
1 von 20
A Project Report On
Railway Ticket Reservation
Submitted By
RAHUL KUSHWAHA
Class : XII A
Under the Guidance of
Mr. Anil Kumar
PGT (Computer Science)
Department of Computer Science
Kendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam.
C E R T I F I C A T E
This is to certify that RAHUL KUSHWAHA
Of Class XII A has prepared the report on the Project entitled
“Railway Ticket Reservation”. The report is the result of his
efforts & endeavors. The report is found worthy of acceptance
as final project report for the subject Computer Science of Class
XII. He has prepared the report under my guidance.
(Mr. Anil Kumar)
PGT (Computer Science)
Department of Computer Science
Kendriya Vidyalaya No.2,
Nausenabaugh,
Visakhapatnam.
Department of Computer Science
Kendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam
C E R T I F I C A T E
The project report entitled
“Railway Ticket Reservation”,
Submitted by RAHUL KUSHWAHA of Class XII A for
the CBSE Senior Secondary Examination class XII of
Computer Science at Kendriya Vidyalaya No. 2,
Nausenabaugh Visakhapatnam has been examined.
SIGNATURE OF EXAMINER
Department of Computer Science
Kendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam
D E C L A R A T I O N
I hereby declare that the project work entitled
“Railway Ticket Reservation”, submitted to
Department of Computer Science, Kendriya
Vidyalaya No. 2, Nausenabaugh,
Visakhapatnam is prepared by me. All the
coding are result of my personal efforts.
RAHUL KUSHWAHA
Class XII A
A C K N O W L E D G E M E N T
I would like to express a deep sense of thanks & gratitude to my
project guide Mr. Anil Kumar Sir for guiding me immensely through the
course of the project. He always evinced keen interest in my work. His
constructive advice & constant motivation have been responsible for the
successful completion of this project.
My sincere thanks goes to Shri S.V. Babu, Our principal sir, for his
co-ordination in extending every possible support for the completion of
this project.
I also thanks to my parents for their motivation & support. I must
thanks to my classmates for their timely help & support for compilation
of this project.
Last but not the least, I would like to thank all those who had
helped directly or indirectly towards the completion of this project.
RAHUL KUSHWAHA
Class: XIIA
CONTENTS
1. HEADER FILES USED. . . . . . . . . . . . . . . . .
2. FILES GENERATED. . . . . . . . . . . . . . . . . . .
3. WORKING DESCRIPTION. . . . . . . . . . . . .
4. CODING. . . . . . . . . .. . . . . . . . . . . . . . . . .
5. OUTPUT SCREENS. . . . . . . . . . . . . . . . . . .
6. CONCLUSION. . . . . . . . . . . . . . . . . . . . . .
. . . .
7. BIBLIOGRAPHY. . . . . . . . . . . . . . . . . . . . .
. . . .
HEADER FILES USED
1.FSTREAM.H – for file handling, cin and cout
2. PROCESS.H – for exit() function
3. CONIO.H – for clrscr() and getch()
functions
4. STDIO.H – for standard I/O operations
5.STRING.H – for string handling
6.MATH.H–for doing mathematical operations
FILES GENERATED
DATA FILES
TRAIN.DAT
PROGRAM FILE
RAILWAY TICKET RESERVATION.CPP
OBJECT FILE
TRAIN.OBJ
EXECUTION FILE
TRAIN.EXE
WORKING DESCRIPTION
This program is designed to keep the friend’s
record.
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
CODING
//Indian Railways - Ticket Reservation
//Submitted By RAHUL KUSHWAHA
#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 KM RATES
5. TO MODIFY DATABASE 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

Weitere ähnliche Inhalte

Was ist angesagt?

class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In PythonAbhishekKumarMorla
 
Factors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsFactors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsHarsh Solanki
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12RithuJ
 
chemistry investigatory project on food adulteration
chemistry investigatory project on food adulterationchemistry investigatory project on food adulteration
chemistry investigatory project on food adulterationappietech
 
cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project NIKHIL DWIVEDI
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKAnkitSharma1903
 
Chemistry project for Class 12
Chemistry project for Class 12Chemistry project for Class 12
Chemistry project for Class 12Shahban Ali
 
Study Of oxalte ion in guava fruit at different stages of ripening
Study Of oxalte ion in guava fruit at different stages of ripeningStudy Of oxalte ion in guava fruit at different stages of ripening
Study Of oxalte ion in guava fruit at different stages of ripeningPrince Warade
 
Physics Investigatory - Electromagnetic Induction. CLASS XII
Physics Investigatory - Electromagnetic Induction.    CLASS XIIPhysics Investigatory - Electromagnetic Induction.    CLASS XII
Physics Investigatory - Electromagnetic Induction. CLASS XIIEligetiVishnu
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQLDarshit Vaghasiya
 
“To estimate the charge induced on each one of the two identical Styrofoam (o...
“To estimate the charge induced on each one of the two identical Styrofoam (o...“To estimate the charge induced on each one of the two identical Styrofoam (o...
“To estimate the charge induced on each one of the two identical Styrofoam (o...VanshPatil7
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
Physics Investigatory Project
Physics Investigatory  ProjectPhysics Investigatory  Project
Physics Investigatory ProjectDIVYANSHU KUMAR
 
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...CHMURLIDHAR
 
Chemistry Investigatory Project of class 12th CBSE
Chemistry Investigatory Project  of class 12th CBSEChemistry Investigatory Project  of class 12th CBSE
Chemistry Investigatory Project of class 12th CBSENagesh Agrawal
 
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...Arjun Kumar Sah
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...AnkitSharma1903
 
Chemistry Investigatory Project Class XII
Chemistry Investigatory Project Class XII Chemistry Investigatory Project Class XII
Chemistry Investigatory Project Class XII AsanalMahathir
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 

Was ist angesagt? (20)

class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
 
Factors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsFactors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell depends
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
chemistry investigatory project on food adulteration
chemistry investigatory project on food adulterationchemistry investigatory project on food adulteration
chemistry investigatory project on food adulteration
 
cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project cbse 12th chemistry investigatory project
cbse 12th chemistry investigatory project
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
 
Chemistry project for Class 12
Chemistry project for Class 12Chemistry project for Class 12
Chemistry project for Class 12
 
Study Of oxalte ion in guava fruit at different stages of ripening
Study Of oxalte ion in guava fruit at different stages of ripeningStudy Of oxalte ion in guava fruit at different stages of ripening
Study Of oxalte ion in guava fruit at different stages of ripening
 
Physics Investigatory - Electromagnetic Induction. CLASS XII
Physics Investigatory - Electromagnetic Induction.    CLASS XIIPhysics Investigatory - Electromagnetic Induction.    CLASS XII
Physics Investigatory - Electromagnetic Induction. CLASS XII
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
 
“To estimate the charge induced on each one of the two identical Styrofoam (o...
“To estimate the charge induced on each one of the two identical Styrofoam (o...“To estimate the charge induced on each one of the two identical Styrofoam (o...
“To estimate the charge induced on each one of the two identical Styrofoam (o...
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
Physics Investigatory Project
Physics Investigatory  ProjectPhysics Investigatory  Project
Physics Investigatory Project
 
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...TOPIC-To investigate the relation between the ratio of :-1. Input and outpu...
TOPIC-To investigate the relation between the ratio of :- 1. Input and outpu...
 
Chemistry Investigatory Project of class 12th CBSE
Chemistry Investigatory Project  of class 12th CBSEChemistry Investigatory Project  of class 12th CBSE
Chemistry Investigatory Project of class 12th CBSE
 
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
To Study the earth's magnetic field using a tangent galvanometer Tangent galv...
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
 
Chemistry Investigatory Project Class XII
Chemistry Investigatory Project Class XII Chemistry Investigatory Project Class XII
Chemistry Investigatory Project Class XII
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 

Andere mochten auch

Computer science project work
Computer science project workComputer science project work
Computer science project workrahulchamp2345
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station softwaredharmenderlodhi021
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science ProjectAshwin Francis
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++) Nirdhishwar Nirdhi
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing Swakriti Rathore
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++ Prince Kumar
 
Project report
Project reportProject report
Project reportmeenalpandey
 
The railway ticket service c++ project class 12
The railway ticket service c++ project class 12The railway ticket service c++ project class 12
The railway ticket service c++ project class 12Sandeep Chandel
 
C++ Project
C++ ProjectC++ Project
C++ Projectsrinu2792
 
Communication - Laser Class 12 Part-7
Communication - Laser Class 12 Part-7Communication - Laser Class 12 Part-7
Communication - Laser Class 12 Part-7Self-employed
 
Semiconductor Devices Class 12 Part-1
Semiconductor Devices Class 12 Part-1Semiconductor Devices Class 12 Part-1
Semiconductor Devices Class 12 Part-1Self-employed
 
Communication - Line Communication Class 12 Part-6
Communication - Line Communication Class 12 Part-6Communication - Line Communication Class 12 Part-6
Communication - Line Communication Class 12 Part-6Self-employed
 
Communication - Space Communication Class 12 Part-5
Communication - Space Communication Class 12 Part-5Communication - Space Communication Class 12 Part-5
Communication - Space Communication Class 12 Part-5Self-employed
 
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12Self-employed
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementAnupam Narang
 
Communication - Amplitude Modulation Class 12 Part-1
Communication - Amplitude Modulation Class 12 Part-1Communication - Amplitude Modulation Class 12 Part-1
Communication - Amplitude Modulation Class 12 Part-1Self-employed
 
Railway reservation(c++ project)
Railway reservation(c++ project)Railway reservation(c++ project)
Railway reservation(c++ project)Debashis Rath
 
Communication System Devices
Communication System DevicesCommunication System Devices
Communication System DevicesJason Hando
 
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Vidhi Kishor
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal Syed Junaid
 

Andere mochten auch (20)

Computer science project work
Computer science project workComputer science project work
Computer science project work
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 
c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++
 
Project report
Project reportProject report
Project report
 
The railway ticket service c++ project class 12
The railway ticket service c++ project class 12The railway ticket service c++ project class 12
The railway ticket service c++ project class 12
 
C++ Project
C++ ProjectC++ Project
C++ Project
 
Communication - Laser Class 12 Part-7
Communication - Laser Class 12 Part-7Communication - Laser Class 12 Part-7
Communication - Laser Class 12 Part-7
 
Semiconductor Devices Class 12 Part-1
Semiconductor Devices Class 12 Part-1Semiconductor Devices Class 12 Part-1
Semiconductor Devices Class 12 Part-1
 
Communication - Line Communication Class 12 Part-6
Communication - Line Communication Class 12 Part-6Communication - Line Communication Class 12 Part-6
Communication - Line Communication Class 12 Part-6
 
Communication - Space Communication Class 12 Part-5
Communication - Space Communication Class 12 Part-5Communication - Space Communication Class 12 Part-5
Communication - Space Communication Class 12 Part-5
 
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12
Photoelectric Effect And Dual Nature Of Matter And Radiation Class 12
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
 
Communication - Amplitude Modulation Class 12 Part-1
Communication - Amplitude Modulation Class 12 Part-1Communication - Amplitude Modulation Class 12 Part-1
Communication - Amplitude Modulation Class 12 Part-1
 
Railway reservation(c++ project)
Railway reservation(c++ project)Railway reservation(c++ project)
Railway reservation(c++ project)
 
Communication System Devices
Communication System DevicesCommunication System Devices
Communication System Devices
 
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
Computer project C++ CLASS 12TH (CD MANAGEMENT SYSTEM )
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal
 

Ă„hnlich wie Computer Science Investigatory Project Class 12

Railway reservation(c++)
Railway reservation(c++)Railway reservation(c++)
Railway reservation(c++)Pusan Sen
 
C.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationC.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationVirat Prasad
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul PatelMitul Patel
 
Computer science project
Computer science projectComputer science project
Computer science projectSandeep Yadav
 
Internship report on MyGP of Grameenphone LTD.
Internship report on MyGP of Grameenphone LTD.Internship report on MyGP of Grameenphone LTD.
Internship report on MyGP of Grameenphone LTD.Insan Haque
 
Integrated approach to sustainable development of indian railway stations t...
Integrated approach to sustainable development of indian railway stations   t...Integrated approach to sustainable development of indian railway stations   t...
Integrated approach to sustainable development of indian railway stations t...satyalaxmi naidu
 
Minor project Report (1).docx
Minor project Report (1).docxMinor project Report (1).docx
Minor project Report (1).docxSunilShah57
 
CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12anekant28
 
student-data-management-1-2.doc
student-data-management-1-2.docstudent-data-management-1-2.doc
student-data-management-1-2.docJagaBehera1
 
Student portal system application -Project Book
Student portal system application -Project BookStudent portal system application -Project Book
Student portal system application -Project BookS.M. Fazla Rabbi
 
Front of V D report pdf
Front of V D report pdfFront of V D report pdf
Front of V D report pdfShiva Nand
 
Prof Chethan Raj C, Final year Project Report Format
Prof Chethan Raj C, Final year Project Report FormatProf Chethan Raj C, Final year Project Report Format
Prof Chethan Raj C, Final year Project Report FormatProf Chethan Raj C
 
final report_51_33_17
final report_51_33_17final report_51_33_17
final report_51_33_17Darshil Shah
 
Civil Engineering Practicum Report
Civil Engineering Practicum ReportCivil Engineering Practicum Report
Civil Engineering Practicum ReportAbdullah Al Baki
 
Study space(report)
Study space(report)Study space(report)
Study space(report)ajaycparmar
 
automatic four way hacksaw cutting machine
automatic four way hacksaw cutting machineautomatic four way hacksaw cutting machine
automatic four way hacksaw cutting machinesatyendra singh
 
Mini cnc plotter or printer
Mini cnc plotter or printer Mini cnc plotter or printer
Mini cnc plotter or printer Mauryasuraj98
 
Design of facilty Layout of a LED bulb Production sysem
Design of facilty Layout of a LED bulb Production sysemDesign of facilty Layout of a LED bulb Production sysem
Design of facilty Layout of a LED bulb Production sysemMaheer Sohbat
 
report final 2
report final 2report final 2
report final 2Maheer Sohbat
 

Ă„hnlich wie Computer Science Investigatory Project Class 12 (20)

Railway reservation(c++)
Railway reservation(c++)Railway reservation(c++)
Railway reservation(c++)
 
C.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationC.S. project report on railway ticket reservation
C.S. project report on railway ticket reservation
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
 
Final Report
Final ReportFinal Report
Final Report
 
Computer science project
Computer science projectComputer science project
Computer science project
 
Internship report on MyGP of Grameenphone LTD.
Internship report on MyGP of Grameenphone LTD.Internship report on MyGP of Grameenphone LTD.
Internship report on MyGP of Grameenphone LTD.
 
Integrated approach to sustainable development of indian railway stations t...
Integrated approach to sustainable development of indian railway stations   t...Integrated approach to sustainable development of indian railway stations   t...
Integrated approach to sustainable development of indian railway stations t...
 
Minor project Report (1).docx
Minor project Report (1).docxMinor project Report (1).docx
Minor project Report (1).docx
 
CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12CS Project on Railway Tickect Reservation for class 12
CS Project on Railway Tickect Reservation for class 12
 
student-data-management-1-2.doc
student-data-management-1-2.docstudent-data-management-1-2.doc
student-data-management-1-2.doc
 
Student portal system application -Project Book
Student portal system application -Project BookStudent portal system application -Project Book
Student portal system application -Project Book
 
Front of V D report pdf
Front of V D report pdfFront of V D report pdf
Front of V D report pdf
 
Prof Chethan Raj C, Final year Project Report Format
Prof Chethan Raj C, Final year Project Report FormatProf Chethan Raj C, Final year Project Report Format
Prof Chethan Raj C, Final year Project Report Format
 
final report_51_33_17
final report_51_33_17final report_51_33_17
final report_51_33_17
 
Civil Engineering Practicum Report
Civil Engineering Practicum ReportCivil Engineering Practicum Report
Civil Engineering Practicum Report
 
Study space(report)
Study space(report)Study space(report)
Study space(report)
 
automatic four way hacksaw cutting machine
automatic four way hacksaw cutting machineautomatic four way hacksaw cutting machine
automatic four way hacksaw cutting machine
 
Mini cnc plotter or printer
Mini cnc plotter or printer Mini cnc plotter or printer
Mini cnc plotter or printer
 
Design of facilty Layout of a LED bulb Production sysem
Design of facilty Layout of a LED bulb Production sysemDesign of facilty Layout of a LED bulb Production sysem
Design of facilty Layout of a LED bulb Production sysem
 
report final 2
report final 2report final 2
report final 2
 

Mehr von Self-employed

Chemistry Investigatory Project Class 12
Chemistry Investigatory Project Class 12Chemistry Investigatory Project Class 12
Chemistry Investigatory Project Class 12Self-employed
 
Semiconductor Devices Class 12 Part-3
Semiconductor Devices Class 12 Part-3Semiconductor Devices Class 12 Part-3
Semiconductor Devices Class 12 Part-3Self-employed
 
Semiconductor Devices Class 12 Part-2
Semiconductor Devices Class 12 Part-2Semiconductor Devices Class 12 Part-2
Semiconductor Devices Class 12 Part-2Self-employed
 
Semiconductor Devices Class 12 Part-4
Semiconductor Devices Class 12 Part-4Semiconductor Devices Class 12 Part-4
Semiconductor Devices Class 12 Part-4Self-employed
 
Nuclei And Atoms Class 12
Nuclei And Atoms Class 12Nuclei And Atoms Class 12
Nuclei And Atoms Class 12Self-employed
 
Wave Optics Class 12 Part-1
Wave Optics Class 12 Part-1Wave Optics Class 12 Part-1
Wave Optics Class 12 Part-1Self-employed
 
Ray Optics Class 12 Part-2
Ray Optics Class 12 Part-2Ray Optics Class 12 Part-2
Ray Optics Class 12 Part-2Self-employed
 
Ray Optics Class 12 Part-1
Ray Optics Class 12 Part-1Ray Optics Class 12 Part-1
Ray Optics Class 12 Part-1Self-employed
 
Wave Optics Class 12 Part-2
Wave Optics Class 12 Part-2Wave Optics Class 12 Part-2
Wave Optics Class 12 Part-2Self-employed
 
Electromagnetic Waves Class 12
Electromagnetic Waves Class 12 Electromagnetic Waves Class 12
Electromagnetic Waves Class 12 Self-employed
 
Electromagnetic Induction Class 12
Electromagnetic Induction Class 12 Electromagnetic Induction Class 12
Electromagnetic Induction Class 12 Self-employed
 
Alternating Currents Class 12
Alternating Currents Class 12Alternating Currents Class 12
Alternating Currents Class 12Self-employed
 
Magnetic Effects Of Current Class 12 Part-3
Magnetic Effects Of Current Class 12 Part-3Magnetic Effects Of Current Class 12 Part-3
Magnetic Effects Of Current Class 12 Part-3Self-employed
 
Magnetic Effects Of Current Class 12 Part-1
Magnetic Effects Of Current Class 12 Part-1Magnetic Effects Of Current Class 12 Part-1
Magnetic Effects Of Current Class 12 Part-1Self-employed
 
Magnetic Effects Of Current Class 12 Part-2
Magnetic Effects Of Current Class 12 Part-2Magnetic Effects Of Current Class 12 Part-2
Magnetic Effects Of Current Class 12 Part-2Self-employed
 
Current Electricity Class 12 Part-2
Current Electricity Class 12 Part-2Current Electricity Class 12 Part-2
Current Electricity Class 12 Part-2Self-employed
 
Current Electricity Class 12 Part-1
Current Electricity Class 12 Part-1Current Electricity Class 12 Part-1
Current Electricity Class 12 Part-1Self-employed
 
Current Electricity Class 12 Part-3
Current Electricity Class 12 Part-3Current Electricity Class 12 Part-3
Current Electricity Class 12 Part-3Self-employed
 
Electrostatics Class 12- Part 4
Electrostatics Class 12- Part 4Electrostatics Class 12- Part 4
Electrostatics Class 12- Part 4Self-employed
 

Mehr von Self-employed (20)

Chemistry Investigatory Project Class 12
Chemistry Investigatory Project Class 12Chemistry Investigatory Project Class 12
Chemistry Investigatory Project Class 12
 
Semiconductor Devices Class 12 Part-3
Semiconductor Devices Class 12 Part-3Semiconductor Devices Class 12 Part-3
Semiconductor Devices Class 12 Part-3
 
Semiconductor Devices Class 12 Part-2
Semiconductor Devices Class 12 Part-2Semiconductor Devices Class 12 Part-2
Semiconductor Devices Class 12 Part-2
 
Semiconductor Devices Class 12 Part-4
Semiconductor Devices Class 12 Part-4Semiconductor Devices Class 12 Part-4
Semiconductor Devices Class 12 Part-4
 
Nuclei And Atoms Class 12
Nuclei And Atoms Class 12Nuclei And Atoms Class 12
Nuclei And Atoms Class 12
 
Wave Optics Class 12 Part-1
Wave Optics Class 12 Part-1Wave Optics Class 12 Part-1
Wave Optics Class 12 Part-1
 
Ray Optics Class 12 Part-2
Ray Optics Class 12 Part-2Ray Optics Class 12 Part-2
Ray Optics Class 12 Part-2
 
Ray Optics Class 12 Part-1
Ray Optics Class 12 Part-1Ray Optics Class 12 Part-1
Ray Optics Class 12 Part-1
 
Wave Optics Class 12 Part-2
Wave Optics Class 12 Part-2Wave Optics Class 12 Part-2
Wave Optics Class 12 Part-2
 
Electromagnetic Waves Class 12
Electromagnetic Waves Class 12 Electromagnetic Waves Class 12
Electromagnetic Waves Class 12
 
Electromagnetic Induction Class 12
Electromagnetic Induction Class 12 Electromagnetic Induction Class 12
Electromagnetic Induction Class 12
 
Alternating Currents Class 12
Alternating Currents Class 12Alternating Currents Class 12
Alternating Currents Class 12
 
Magnetism
MagnetismMagnetism
Magnetism
 
Magnetic Effects Of Current Class 12 Part-3
Magnetic Effects Of Current Class 12 Part-3Magnetic Effects Of Current Class 12 Part-3
Magnetic Effects Of Current Class 12 Part-3
 
Magnetic Effects Of Current Class 12 Part-1
Magnetic Effects Of Current Class 12 Part-1Magnetic Effects Of Current Class 12 Part-1
Magnetic Effects Of Current Class 12 Part-1
 
Magnetic Effects Of Current Class 12 Part-2
Magnetic Effects Of Current Class 12 Part-2Magnetic Effects Of Current Class 12 Part-2
Magnetic Effects Of Current Class 12 Part-2
 
Current Electricity Class 12 Part-2
Current Electricity Class 12 Part-2Current Electricity Class 12 Part-2
Current Electricity Class 12 Part-2
 
Current Electricity Class 12 Part-1
Current Electricity Class 12 Part-1Current Electricity Class 12 Part-1
Current Electricity Class 12 Part-1
 
Current Electricity Class 12 Part-3
Current Electricity Class 12 Part-3Current Electricity Class 12 Part-3
Current Electricity Class 12 Part-3
 
Electrostatics Class 12- Part 4
Electrostatics Class 12- Part 4Electrostatics Class 12- Part 4
Electrostatics Class 12- Part 4
 

KĂĽrzlich hochgeladen

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

KĂĽrzlich hochgeladen (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Computer Science Investigatory Project Class 12

  • 1. A Project Report On Railway Ticket Reservation Submitted By RAHUL KUSHWAHA Class : XII A Under the Guidance of Mr. Anil Kumar PGT (Computer Science) Department of Computer Science Kendriya Vidyalaya No. 2, Nausenabaugh Visakhapatnam.
  • 2. C E R T I F I C A T E This is to certify that RAHUL KUSHWAHA Of Class XII A has prepared the report on the Project entitled “Railway Ticket Reservation”. The report is the result of his efforts & endeavors. The report is found worthy of acceptance as final project report for the subject Computer Science of Class XII. He has prepared the report under my guidance. (Mr. Anil Kumar) PGT (Computer Science) Department of Computer Science Kendriya Vidyalaya No.2, Nausenabaugh, Visakhapatnam. Department of Computer Science Kendriya Vidyalaya No. 2, Nausenabaugh Visakhapatnam
  • 3. C E R T I F I C A T E The project report entitled “Railway Ticket Reservation”, Submitted by RAHUL KUSHWAHA of Class XII A for the CBSE Senior Secondary Examination class XII of Computer Science at Kendriya Vidyalaya No. 2, Nausenabaugh Visakhapatnam has been examined. SIGNATURE OF EXAMINER Department of Computer Science Kendriya Vidyalaya No. 2, Nausenabaugh Visakhapatnam
  • 4. D E C L A R A T I O N I hereby declare that the project work entitled “Railway Ticket Reservation”, submitted to Department of Computer Science, Kendriya Vidyalaya No. 2, Nausenabaugh, Visakhapatnam is prepared by me. All the coding are result of my personal efforts. RAHUL KUSHWAHA Class XII A
  • 5. A C K N O W L E D G E M E N T I would like to express a deep sense of thanks & gratitude to my project guide Mr. Anil Kumar Sir for guiding me immensely through the course of the project. He always evinced keen interest in my work. His constructive advice & constant motivation have been responsible for the successful completion of this project. My sincere thanks goes to Shri S.V. Babu, Our principal sir, for his co-ordination in extending every possible support for the completion of this project. I also thanks to my parents for their motivation & support. I must thanks to my classmates for their timely help & support for compilation of this project. Last but not the least, I would like to thank all those who had helped directly or indirectly towards the completion of this project. RAHUL KUSHWAHA Class: XIIA
  • 6. CONTENTS 1. HEADER FILES USED. . . . . . . . . . . . . . . . . 2. FILES GENERATED. . . . . . . . . . . . . . . . . . . 3. WORKING DESCRIPTION. . . . . . . . . . . . . 4. CODING. . . . . . . . . .. . . . . . . . . . . . . . . . . 5. OUTPUT SCREENS. . . . . . . . . . . . . . . . . . . 6. CONCLUSION. . . . . . . . . . . . . . . . . . . . . . . . . . 7. BIBLIOGRAPHY. . . . . . . . . . . . . . . . . . . . . . . . .
  • 7. HEADER FILES USED 1.FSTREAM.H – for file handling, cin and cout 2. PROCESS.H – for exit() function 3. CONIO.H – for clrscr() and getch() functions 4. STDIO.H – for standard I/O operations 5.STRING.H – for string handling 6.MATH.H–for doing mathematical operations
  • 8. FILES GENERATED DATA FILES TRAIN.DAT PROGRAM FILE RAILWAY TICKET RESERVATION.CPP OBJECT FILE TRAIN.OBJ EXECUTION FILE TRAIN.EXE
  • 9. WORKING DESCRIPTION This program is designed to keep the friend’s record. 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
  • 10. CODING //Indian Railways - Ticket Reservation //Submitted By RAHUL KUSHWAHA #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)
  • 11. { 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<<"-";
  • 12. } 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(); }
  • 13. 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 )
  • 15. } } } 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(); }
  • 16. OUTPUT 1. WELCOME SCREEN 2. ADD NEW RAILWAY STATION
  • 17. 3. TO BOOK TICKET 4. TO CHANGE PER KM RATES
  • 18. 5. TO MODIFY DATABASE OF TRAIN
  • 20. 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