Governmentassignmentkennychrisaustin 091005142914 Phpapp01 091007142214 Phpapp01
computerinv-140316012603-phpapp01
-
Upload
surajmandal -
Category
Documents
-
view
218 -
download
0
Transcript of computerinv-140316012603-phpapp01
-
8/12/2019 computerinv-140316012603-phpapp01
1/20
A Project Report OnR ilw y TickeT ReseRv Tion
Submitted ByRAHUL KUSHWAHA
Class : XII A
Under the Guidance of
Mr. Anil KumarPGT (Computer Science)
Department of Computer ScienceKendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam.
-
8/12/2019 computerinv-140316012603-phpapp01
2/20
C E R T I F I C A T EThis 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 ScienceKendriya Vidyalaya No.2,Nausenabaugh,Visakhapatnam.
Department of Computer Science
Kendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam
-
8/12/2019 computerinv-140316012603-phpapp01
3/20
c e R T i F i c T e
The project report entitled
Railway Ticket Reservation,Submitted by RAHUL KUSHWAHA of Class XII A forthe CBSE Senior Secondary Examination class XII ofComputer Science at Kendriya Vidyalaya No. 2,Nausenabaugh Visakhapatnam has been examined.
SIGNATURE OF EXAMINER
Department of Computer Science
Kendriya Vidyalaya No. 2, Nausenabaugh
Visakhapatnam
-
8/12/2019 computerinv-140316012603-phpapp01
4/20
D E C L A R A T I O NI hereby declare that the project work entitledRailway Ticket Reservation, submitted toDepartment of Computer Science, KendriyaVidyalaya No. 2, Nausenabaugh,
Visakhapatnam is prepared by me. All thecoding are result of my personal efforts.
RAHUL KUSHWAHAClass XII A
-
8/12/2019 computerinv-140316012603-phpapp01
5/20
A C K N O W L E D G E M E N TI 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 KUSHWAHAClass: XIIA
-
8/12/2019 computerinv-140316012603-phpapp01
6/20
CONTENTS
1. HEADER FILES USED. . . . . . . . . . . . . . . . .2. FILES GENERATED. . . . . . . . . . . . . . . . . . .3. WORKING DESCRIPTION. . . . . . . . . . . . .4. CODING. . . . . . . . . .. . . . . . . . . . . . . . . . .5. OUTPUT SCREENS. . . . . . . . . . . . . . . . . . .6. CONCLUSION. . . . . . . . . . . . . . . . . . . . . .. . . .7. BIBLIOGRAPHY. . . . . . . . . . . . . . . . . . . . .. . . .
-
8/12/2019 computerinv-140316012603-phpapp01
7/20
HEADER FILES USED
1.FSTREAM.H for file handling, cin and cout2.PROCESS.H for exit() function3.CONIO.H for clrscr() and getch()
functions4.STDIO.H for standard I/O operations5.STRING.H for string handling6.MATH.Hfor doing mathematical operations
-
8/12/2019 computerinv-140316012603-phpapp01
8/20
FILES GENERATED
DATA FILESTRAIN.DAT
PROGRAM FILERAILWAY TICKET RESERVATION.CPP
OBJECT FILETRAIN.OBJ
EXECUTION FILETRAIN.EXE
-
8/12/2019 computerinv-140316012603-phpapp01
9/20
WORKING DESCRIPTION
This program is designed to keep the friendsrecord.This program consists of FIVE options asfollows
1. TO ADD NEW RAILWAY STATION2. TO BOOK TICKET3. TO CHANGE PER KM RATES4. TO MODIFY DATABASE OF TRAIN5. TO EXIT
-
8/12/2019 computerinv-140316012603-phpapp01
10/20
CODING
//Indian Railways - Ticket Reservation//Submitted By RAHUL KUSHWAHA#include#include#include#include#include#include
char from[30],to[30];void detail(){
cout
-
8/12/2019 computerinv-140316012603-phpapp01
11/20
{cout
-
8/12/2019 computerinv-140316012603-phpapp01
12/20
}
cout
-
8/12/2019 computerinv-140316012603-phpapp01
13/20
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
-
8/12/2019 computerinv-140316012603-phpapp01
14/20
{
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
-
8/12/2019 computerinv-140316012603-phpapp01
15/20
}
}
}
if(choice==5)
{cout
-
8/12/2019 computerinv-140316012603-phpapp01
16/20
OUTPUT
1. WELCOME SCREEN
2. ADD NEW RAILWAY STATION
-
8/12/2019 computerinv-140316012603-phpapp01
17/20
3. TO BOOK TICKET
4. TO CHANGE PER KM RATES
-
8/12/2019 computerinv-140316012603-phpapp01
18/20
5. TO MODIFY DATABASE OF TRAIN
-
8/12/2019 computerinv-140316012603-phpapp01
19/20
6. TO EXIT
-
8/12/2019 computerinv-140316012603-phpapp01
20/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
http://www.google.com/http://en.wikipedia.org/http://www.botskool.com/http://www.botskool.com/http://www.botskool.com/http://en.wikipedia.org/http://www.google.com/