You are on page 1of 41

COMPUTER PROJECT

TRAN RESERVATON


ntroduction


1h|: |: o roject bo:ed on tro|n re:eruot|on. 1he roqrom he|: u: to
enter , d|:|oy or o|ter the deto||: of d|fferent tro|n:. Moreouer & mo:t
|mortont|y the roqrom he|: u: to re:erue or conce| o tro|n t|chet.
1he roqrom o|:o he|: u: to hnow the re:ent :totu: of o re:erued
t|chet, |.e whether the t|chet |: conf|rmed or not. |t |nc|ude: uor|ou:
funct|on roqrom: to do the oboue ment|oned to:h:. Doto f||e
hond||nq ho: been effect|ue|y u:ed |n the roqrom.









PROGRAM
CODE



//8CC8AM 18Aln 8LSL8vA1lCn
#lncludelosLreamh
#lncludeconloh
#lncludesLrlngh
#lncludedosh
#lncludesLdloh
#lncludefsLreamh
#lncludeprocessh
#lncludesLdllbh

class Lraln

prlvaLe
lnL LralnnonofafseaLnofasseaLnoffsseaLnofacseaLnofssseaL
char Lralnname60sLarLlngpolnL60desLlnaLlon60
publlc
Lraln()

Lralnno0
nofafseaL0
nofasseaL0
noffsseaL0
nofacseaL0
nofssseaL0
sLrcpy(Lralnname/0)
sLrcpy(sLarLlngpolnL/0)
sLrcpy(desLlnaLlon/0)

vold lnpuL() //1o lnpuL Lhe deLalls
vold dlsplay() //1o dlsplay Lhe deLalls
lnL reLurnLr()
lnL reLurnaf()
lnL reLurnas()
lnL reLurnfs()
lnL reLurnac()
lnL reLurnss()
Lr

lnL LralnreLurnLr()

reLurn Lralnno


lnL LralnreLurnaf()

reLurn nofafseaL


lnL LralnreLurnas()

reLurn nofasseaL


lnL LralnreLurnfs()

reLurn noffsseaL


lnL LralnreLurnac()

reLurn nofacseaL


lnL LralnreLurnss()

reLurn nofssseaL


vold LralnlnpuL()

clrscr()
goLoxy(1010)
couLLn1L8 1PL 18Aln nuM8L8
goLoxy(3710)
clnLralnno
goLoxy(1012)
couLLn1L8 1PL nuM8L8 Cl A/C ll8S1 CLASS SLA1S
goLoxy(3712)
clnnofafseaL
goLoxy(1014)
couLLn1L8 1PL nuM8L8 Cl A/C SLCCnu CLASS SLA1S
goLoxy(3714)
clnnofasseaL
goLoxy(1016)
couLLn1L8 1PL nuM8L8 Cl ll8S1 CLASS SLLLL8 SLA1S
goLoxy(3716)
clnnoffsseaL
goLoxy(1018)
couLLn1L8 1PL nuM8L8 Cl A/C CPAl8 CA8 SLA1S
goLoxy(3718)
clnnofacseaL
goLoxy(1020)
couLLn1L8 1PL nuM8L8 Cl SLCCnu CLASS SLLLL8 SLA1S
goLoxy(3720)
clnnofssseaL
goLoxy(1022)
couLLn1L8 1PL 18Aln nAML
goLoxy(3722)
geLs(Lralnname)
goLoxy(1024)
couLLn1L8 1PL S1A81lnC Cln1
goLoxy(3724)
geLs(sLarLlngpolnL)
goLoxy(1026)
couLLn1L8 1PL uLS1lnA1lCn
goLoxy(3726)
geLs(desLlnaLlon)


vold Lralndlsplay ()

clrscr()
goLoxy(1010)
couL18Aln nuM8L8
goLoxy(4710)
couLLralnno
goLoxy(1012)
couL18Aln nAML
goLoxy(4712)
puLs(Lralnname)
goLoxy(1014)
couLnC Cl A/C ll8S1 CLASS SLA1S
goLoxy(4714)
couLnofafseaL
goLoxy(1016)
couLnC Cl A/C SLCCnu CLASS SLA1S
goLoxy(4716)
couLnofasseaL
goLoxy(1018)
couLnC Cl ll8S1 CLASS SLLLL8 SLA1S
goLoxy(4718)
couLnoffsseaL
goLoxy(1020)
couLnC Cl A/C CPAl8 CLASS SLA1S
goLoxy(4720)
couLnofacseaL
goLoxy(1022)
couLnC Cl SLCCnu CLASS SLLLL8 SLA1S
goLoxy(4722)
couLnofssseaL
goLoxy(1024)
couLS1A81lnC Cln1
goLoxy(4724)
puLs(sLarLlngpolnL)
goLoxy(1026)
couLuLS1lnA1lCn
goLoxy(4726)
puLs(desLlnaLlon)
goLoxy(1028)
couL8LSS An? kL? 1C CCn1lnuL
geLch()


class LlckeLs

lnL resnoLoafnofafLoasnofasLofsnoffsLoacnofacLossnofssage
char sLaLus40name40
publlc
LlckeLs()
vold reservaLlon() //lor LlckeL reservaLlon
vold cancellaLlon() //lor LlckeL cancellaLlon
lnL reL()
vold dlsplay() //1o dlsplay reservaLlon deLalls
Llck

LlckeLsLlckeLs()

resno0
Loaf0
nofaf0
Loas0
nofas0
Lofs0
noffs0
Loac0
nofac0
Loss0
nofss0
age0
sLrcpy(sLaLus/0)
sLrcpy(name/0)


lnL LlckeLsreL()

reLurn resno


vold LlckeLsdlsplay()

lnL f0
clrscr()
lfsLream fn(1lckeL1daLlosouL)
fnseekg(0)
lf(!fn)

couLL88C8 ln 1PL llLL

x
goLoxy(1010)
couLLn1L8 1PL 8LSL8vA1lCn nC
goLoxy(1012)
lnL n
clnn
whlle(!fneof())

fnread((char*)Llckslzeof(Llck))
goLoxy(1010)
lf(nresno)

clrscr()
f1
goLoxy(1010)
couLnAML
goLoxy(3010)
couLname
goLoxy(1012)
couLACL
goLoxy(3012)
couLage
goLoxy(1014)
couL8LSLn1 S1A1uS
goLoxy(3014)
couLsLaLus
goLoxy(1016)
couL8LSL8vA1lCn nuM8L8
goLoxy(3016)
couLresno
goLoxy(1018)
couL8LSS An? kL? 1C CCn1lnuL
geLch()


lf(f0)

clrscr()
goLoxy(1010)
couLun8LCCClnlZLu 8LSL8vA1lCn nC !!! WAnnA 8L18? ?(?/n)
char a
goLoxy(1012)
clna
lf(ay||a?)

clrscr()
goLo x

else

goLoxy(1012)
couL8LSS An? kL? 1C CCn1lnuL
geLch()


fnclose()

vold LlckeLsreservaLlon()

clrscr()
goLoxy(1010)
couL8LSL8vA1lCn
goLoxy(1012)
couLLn1L8 1PL 18Aln nC
lnL Lnof0
clnLno
ofsLream flle
lfsLream fln(1raln1daLlosouL)
flnseekg(0)
lf(!fln)

clrscr()
goLoxy(1010)
couLL88C8 ln 1PL llLL

else

clrscr()
whlle(!flneof())

flnread((char*)Lrslzeof(Lr))
lnL z
zLrreLurnLr()
lf(Lnoz)

f1
nofafLrreLurnaf()
nofasLrreLurnas()
noffsLrreLurnfs()
nofacLrreLurnac()
nofssLrreLurnss()


lf(f1)

flleopen(1lckeL1daLlosapp)
S
clrscr()
goLoxy(1010)
couLnAML
geLs(name)
goLoxy(1012)
couLACL
clnage
clrscr()
goLoxy(1010)
couLSLLLC1 1PL CLASS WPlCP ?Cu WlSP 1C 18AvLL
goLoxy(1012)
couL1A/C ll8S1 CLASS
goLoxy(1014)
couL2A/C SLCCnu CLASS
goLoxy(1016)
couL3ll8S1 CLASS SLLLL8
goLoxy(1018)
couL4A/C CPAl8 CA8
goLoxy(1020)
couL3SLCCnu CLASS SLLLL8
goLoxy(1022)
lnL c
clnc
swlLch(c)

case 1Loaf++
resnorand()
lf((nofafLoaf)0)

sLrcpy(sLaLusconflrmed)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

else

sLrcpy(sLaLuspendlng)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

case 2Loas++
resnorand()
lf((nofasLoas)0)

sLrcpy(sLaLusconflrmed)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

else

sLrcpy(sLaLuspendlng)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

case 3Lofs++
resnorand()
lf((noffsLofs)0)

sLrcpy(sLaLusconflrmed)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

else

sLrcpy(sLaLuspendlng)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

case 4Loac++
resnorand()
lf((nofacLoac)0)

sLrcpy(sLaLusconflrmed)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

else

sLrcpy(sLaLuspendlng)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

case 3Loss++
resnorand()
lf((nofssLoss)0)

sLrcpy(sLaLusconflrmed)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break

else

sLrcpy(sLaLuspendlng)
goLoxy(1024)
couLS1A1uS
goLoxy(3024)
puLs(sLaLus)
goLoxy(1026)
couL8LSL8vA1lCn nC
goLoxy(3026)
couLresno
geLch()
fllewrlLe((char*)Llckslzeof(Llck))
break


goLoxy(1028)
couLuC ?Cu WlSP 1C CCn1lnuL 8CCklnC 1lCkL1S (?/n) ?
goLoxy(1030)
char n
clnn
lf(ny||n?)

goLo S



lf(f0)
clrscr()
goLoxy(1010)
delay(1000)
couLL88C8 ln 1PL 18Aln nuM8L8 Ln1L8Lu !!!
geLch()

flleclose()

vold LlckeLscancellaLlon()
clrscr()
lfsLream fln
flnopen(1lckeL1daLlosouL)
ofsLream flle
flleopen(1emp1daLlosapp)
flnseekg(0)
goLoxy(1010)
couLLn1L8 1PL 8LSL8vA1lCn nC
lnL rf0
clnr
lf(!fln)

couLL88C8 ln 1PL llLL !!!

whlle(!flneof())

flnread((char*)Llckslzeof(Llck))
lnL z
zreL()
lf(z!r)

fllewrlLe((char*)Llckslzeof(Llck))

lf(zr)

f1


flleclose()
flnclose()
remove(1lckeL1daL)
rename(1emp1daL1lckeL1daL)
lf(f0)
goLoxy(1012)
couLnC SuCP 8LSL8vA1lCn lS MAuL !!! LLASL 8L18?
geLch()

else

goLoxy(1012)
couL8LSL8vA1lCn CAnCLLLLu
geLch()



vold maln()

lnL chnolr1000[
clrscr()
goLoxy(3322)
couLWLLCCML
delay(1300)
delay(1000)
Z
clrscr()
goLoxy(238)
couL8AlLWA? 1lCkL1 8LSL8vA1lCn
goLoxy(239)
couL
goLoxy(2013)
couL118Aln uL1AlLS
goLoxy(2017)
couL2uuA1L 18Aln uL1AlLS
goLoxy(2019)
couL38LSL8vlnC A 1lCkL1
goLoxy(2021)
couL4CAnCLLLlnC A 1lCkL1
goLoxy(2023)
couL3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS
goLoxy(2023)
couL6Lxl1
LexLcolor(1)
goLoxy(2027)
couLLn1L8 ?Cu8 CPClCL
clnch
char n
swlLch(ch)

case 1lfsLream fln(1raln1daLlosouL)
flnseekg(0)
clrscr()
lf(!fln)

clrscr()
goLoxy(1010)
couLL88C8 ln 1PL llLL !!!

else
clrscr()
whlle(!flneof())

flnread((char*)Lrslzeof(Lr))
Lrdlsplay()


flnclose()
goLo Z
case 2clrscr()
goLoxy(2010)
couLLn1L8 1PL ASSWC8u
cln[
goLoxy(2030)
couLCPLCklnC LLASL WAl1
delay(2000)
lf([r)

?
ofsLream fouL(1raln1daLlosapp)
LrlnpuL()
fouLwrlLe((char*)Lrslzeof(Lr))
fouLclose()
goLoxy(1030)
couLuC ?Cu WlSP 1C CCn1lnuL uuA1lnC ?(?/n)
clnn
LexLcolor(WPl1L)
lf(ny||n?)
goLo ?
goLo Z

else
goLo Z
case 3LlckreservaLlon()
goLo Z
case 4LlckcancellaLlon()
goLo Z
case 3Llckdlsplay()
goLo Z
case 6exlL(0)

geLch()













SAMPLE
OUTPUT








8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL2








Ln1L8 1PL ASSWC8u 1000





CPLCklnC LLASL WAl1























Ln1L8 1PL 18Aln nuM8L8 2700

Ln1L8 1PL nuM8L8 Cl A/C ll8S1 CLASS SLA1S 300

Ln1L8 1PL nuM8L8 Cl A/C SLCCnu CLASS SLA1S 430

Ln1L8 1PL nuM8L8 Cl ll8S1 CLASS SLLLL8 SLA1S 600

Ln1L8 1PL nuM8L8 Cl A/C CPAl8 CA8 SLA1S 430

Ln1L8 1PL nuM8L8 Cl SLCCnu CLASS SLLLL8 SLA1S 600

Ln1L8 1PL 18Aln nAML ureamz xpress

Ln1L8 1PL S1A81lnC Cln1 Alwaye

Ln1L8 1PL uLS1lnA1lCn Marmagoa

uC ?Cu WlSP 1C CCn1lnuL uuA1lnC ?(?/n)n












8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL 1












18Aln nuM8L8 2700

18Aln nAML ureamz xpress

nC Cl A/C ll8S1 CLASS SLA1S 300

nC Cl A/C SLCCnu CLASS SLA1S 430

nC Cl ll8S1 CLASS SLLLL8 SLA1S 600

nC Cl A/C CPAl8 CLASS SLA1S 430

nC Cl SLCCnu CLASS SLLLL8 SLA1S 600

S1A81lnC Cln1 Alwaye

uLS1lnA1lCn Marmagoa

8LSS An? kL? 1C CCn1lnuL







8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL 3













8LSL8vA1lCn

Ln1L8 1PL 18Aln nC 2700

























SLLLC1 1PL CLASS WPlCP ?Cu WlSP 1C 18AvLL

1A/C ll8S1 CLASS

2A/C SLCCnu CLASS

3ll8S1 CLASS SLLLL8

4A/C CPAl8 CA8

3SLCCnu CLASS SLLLL8

2

S1A1uS conflrmed

8LSL8vA1lCn nC 346

uC ?Cu WlSP 1C CCn1lnuL 8CCklnC 1lCkL1S (?/n) ? n










8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL 3




















Ln1L8 1PL 8LSL8vA1lCn nC

346






















nAML Sudhlr Mlshra

ACL 43

8LSLn1 S1A1uS conflrmed

8LSL8vA1lCn nuM8L8 346

8LSS An? kL? 1C CCn1lnuL

















8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL 4















Ln1L8 1PL 8LSL8vA1lCn nC 346

8LSL8vA1lCn CAnCLLLLu











8AlLWA? 1lCkL1 8LSL8vA1lCn






118Aln uL1AlLS

2uuA1L 18Aln uL1AlLS

38LSL8vlnC A 1lCkL1

4CAnCLLLlnC A 1lCkL1

3ulSLA? 1PL 8LSLn1 1lCkL1 S1A1uS

6Lxl1

Ln1L8 ?Cu8 CPClCL 6

You might also like