diff --git a/Railway ticket reservation/railwayticket.cpp b/Railway ticket reservation/railwayticket.cpp
new file mode 100644
index 00000000..5baeb809
--- /dev/null
+++ b/Railway ticket reservation/railwayticket.cpp
@@ -0,0 +1,594 @@
+To develop a C++project to manage a railway ticket reservation service using object orientedprogramming anddata file handling.
+
+The C++programming language was developed at AT&T Bell laboratories in the early igSo’s by Biarne Stroustrup. He found out “C” lacking for simulating and decided to extend the language by adding features from his favourite language. SimtaSj was one of the earliest object-oriented languages. Biarne Stroustrup called it “C with classes” originally. The name C++ was coined by Rick Mascitti where”++”is the C increment operator. Ever since its birth, C++ evolved to cope with problems encountered by users, and through discussions at AT&T.
+The major reasons for its success is the support for object oriented programming, which is most near to real world situations.
+However, the maturation of the C++ language is attested by 2 recent events:-
+• The formation of an ANSI (American National Standard Institute) C++ committee, and
+• The publication of the Annotated C++ Reference Manual by Ellis and Stroustrup. One can easily judge the importance of C++ as given the following lines:-
+“Object-oriented technology is regarded as the ultimate paradigm for the modeling of the information in the data of logic. The C++ is now shown to fulfill this goal”.
+This is a project basedon train reservation. The program helps us to enter, display or alter the details of different trains.
+Moreover & most importantly the program helps us to reserve or cancel a train ticket.
+The program also helps us to know the present status of a reservedticket, i.e. whether the ticket is confirmedor not.
+It includes various function programs to do the above mentionedtasks.
+
+Data file handling has been effectively usedin the program.
+
+This program uses the concept of object-oriented programming and data file handling.
+The database is a collection of interrelated data to serve multiple applications. That is database programs create files of information. So we see that files are worked with most, inside the program.
+DBMS
+The software required for the management of data is called as DBMS. It has3 models
+• Relation model
+• Hierarchical model
+• Network model
+RELATIONAL MODELIt’s based on the concept on relation. Relation is the table that consists of rows and columns. The rows of the table are called tuple and the columns of the table are called attribute. Numbers of rows in the table is called as cardinality. Number of columns in the table is called as degree.
+HIERARCHICAL MODELIn this type of model, we have multiple records for each record. A particular recordhas one parent
+record. No chid record can exist without parent record. In this, the records are organized in tree (ike structure
+NETWORK MODEL:- In this, the data is representedby collection of records and relationship is represented by (ink or association.
+
+CHARACTERISTICS OF DB MS: -
+• It reduces the redundancy
+• Reduction of data in inconsistency
+• Data sharing
+• Data standardization
+DIFFERENT TYPES OF FILES: -BASED ON ACCESS:-
+• Sequentialfile
+• Serial file
+• Random (direct access) file BASED ON STORAGE:-
+• Text file
+• Binary File
+
+
+
+
+
+
+Program::::
+//PROGRAM - TRAIN RESERVATION #indude #include #include #include #include #include #include #include
+
+class train {
+private :
+int trainno,nofafseat,nofasseat,noffsseat,nofacseat,nofssseat; char trainname[60],startingpoint[60],destination[60]; public :
+train() {
+trainno=0;
+nofafseat=0;
+nofasseat=0;
+noffsseat=0;
+nofacseat=0;
+nofssseat=0;
+strcpy(trainname,"/0");
+strcpy(startingpoint,"/0");
+strcpy(destination,"/0");
+}
+void input(); //To input the details void display(); //To display the details int returntr(); int returnaf();
+
+
+int returnas(); int returnfs(); int returnac(); int returnss();
+}tr;
+int train::returntr() {
+return trainno;
+}
+int train::returnaf()
+{
+return nofafseat;
+}
+int train::returnas() {
+return nofasseat;
+}
+int train::returnfs()
+{
+return noffsseat;
+}
+int train::returnac()
+{
+return nofacseat;
+}
+int train::returnss()
+{
+return nofssseat;
+} 11
+
+void train::input()
+{
+clrscr();
+gotoxy(10,10);
+cout< <"ENTER THE TRAIN NUMBER ";
+gotoxy(57,10);
+cin>>trainno;
+gotoxy(10,12);
+cout< <"ENTER THE NUMBER OF A/C FIRST CLASS SEATS";
+gotoxy(57,12);
+cin>>nofafseat; gotoxy(10,14);
+cout< <"ENTER THE NUMBER OF A/C SECOND CLASS SEATS";
+gotoxy(57,14);
+cin>>nofasseat;
+gotoxy(10,16);
+cout< <"ENTER THE NUMBER OF FIRST CLASS SLEEPER SEATS";
+gotoxy(57,16);
+cin>>noffsseat; gotoxy(10,18);
+cout< <"ENTER THE NUMBER OF A/C CHAIR CAR SEATS"; gotoxy(57,18);
+cin>>nofacseat;
+gotoxy(10,20);
+cout< <"ENTER THE NUMBER OF SECOND CLASS SLEEPER SEATS";
+gotoxy(57,20);
+cin>>nofssseat;
+gotoxy(10,22);
+cout< <"ENTER THE TRAIN NAME";
+gotoxy(57,22);
+gets(trainname);
+gotoxy(10,24);
+cout<<"ENTER THE STARTING POINT ";
+gotoxy(57,24);
+
+
+gets(startingpoint); gotoxy(10,26);
+cout<<"ENTER THE DESTINATION ";
+gotoxy(57,26);
+gets(destination);
+
+
+
+void train::display () {
+clrscr();
+gotoxy(10,10); cout<<"TRAIN NUMBER "; gotoxy(47,10);
+cout<>n;
+while(!fn.eof())
+{
+fn.read((char*)&tick,sizeof(tick));
+
+gotoxy(10,10);
+if(n==resno)
+{
+clrscr();
+f=1;
+gotoxy(10,10);
+cout< <"NAME "; gotoxy(30,10) ; cout<>a;
+if(a==y||a==Y) {
+clrscr();
+goto X;
+}
+else {
+gotoxy(10,12);
+cout< <"PRESS ANY KEY TO CONTINUE"; getch();
+}
+}
+fn.close();
+}
+
+void tickets::reservation()
+{
+clrscr();
+gotoxy(10,10); cout<<"RESERVATION "; gotoxy(10,12);
+cout<<"ENTER THE TRAIN NO: ";
+int tno,f=0; cin>>tno; ofstream file;
+ifstream fin("Train1.dat",ios::out); fin.seekg(0);
+if(!fin)
+{
+clrscr();
+gotoxy(10,10); cout< <"ERROR IN THE FILE ";
+clrscr();
+while(!fin.eof())
+{
+fin.read((char*)&tr,sizeof(tr)); int z;
+z=tr.returntr(); if(tno==z)
+{
+f=1;
+nofaf=tr.returnaf();
+nofas=tr.returnas();
+noffs=tr.returnfs();
+nofac=tr.returnac();
+nofss=tr.returnss();
+}
+}
+if(f==1)
+{
+file.open("Ticket1.dat",ios::app);
+S:
+clrscr();
+gotoxy(10,10); cout<<"NAME:";
+gets(name);
+gotoxy(10,12); cout<<"AGE:";
+cin>>age; clrscr();
+gotoxy(10,10);
+cout< <"SELECT THE CLASS WHICH YOU WISH TO
+TRAVEL"; gotoxy(10,12);
+cout<<"1.A/C FIRST CLASS " ; gotoxy(10,14);
+cout<<"2.A/C SECOND CLASS " ;
+gotoxy(10,16);
+cout<<"3.FIRST CLASS SLEEPER " ;
+gotoxy(10,18); cout<<"4.A/C CHAIR CAR " ;
+gotoxy(10,20);
+cout<<"5.SECOND CLASS SLEEPER ";
+gotoxy(10,22);
+cout<<"ENTER YOUR CHOICE "; gotoxy(30,22);
+int c; cin>>c; switch(c) {
+case 1:
+toaf++;
+resno=rand(); if((nofaf-toaf)>0)
+{
+strcpy(status,"confirmed");
+gotoxy(10,24) ;
+cout< <"STATUS";
+gotoxy(30,24);
+puts(status);
+gotoxy(10,26); cout<<"RESERVATION NO";
+gotoxy(30,26); cout<0)
+{
+strcpy(status,"confirmed");
+gotoxy(10,24) ;
+cout< <"STATUS";
+gotoxy(30,24);
+puts(status);
+gotoxy(10,26); cout<<"RESERVATION NO";
+gotoxy(30,26); cout<0)
+{
+strcpy(status,"confirmed");
+gotoxy(10,24) ;
+cout< <"STATUS";
+gotoxy(30,24);
+puts(status);
+gotoxy(10,26); cout<<"RESERVATION NO";
+gotoxy(30,26); cout<0)
+{
+strcpy(status,"confirmed");
+gotoxy(10,24) ;
+cout< <"STATUS";
+gotoxy(30,24);
+puts(status);
+gotoxy(10,26);
+cout<<"RESERVATION NO";
+gotoxy(30,26);
+cout<0) {
+strcpy(status,"confirmed");
+gotoxy(10,24) ;
+cout< <"STATUS";
+gotoxy(30,24);
+puts(status);
+gotoxy(10,26); cout<<"RESERVATION NO";
+gotoxy(30,26); cout<>n;
+if(n=='y'||n=='Y') {
+goto S;
+}
+}
+}
+if(f==0)
+{
+clrscr();
+gotoxy(10,10);
+cout< <"ERROR IN THE TRAIN NUMBER ENTERED !!!"; getch();
+}
+file.close();
+}
+
+void tickets::cancellation()
+{
+clrscr(); ifstream fin;
+fin.open("Ticket1.dat",ios::out);
+
+ofstream file;
+file.open("Temp1.dat",ios::app);
+fin.seekg(0);
+gotoxy(10,10);
+cout<<"ENTER THE RESERVATION NO ";
+int r,f=0;
+cin>>r;
+if(!fin)
+
+cout< <"ERROR IN THE FILE !!!";
+}
+while(!fin.eof())
+{
+fin.read((char*)&tick,sizeof(tick)); int z;
+z=ret(); if(z!=r)
+{
+file.write((char*)&tick,sizeof(tick));
+}
+if(z==r) {
+f=1;
+}
+}
+file.close(); fin.close();
+remove("Ticket1.dat"); rename("Temp1.dat","Ticket1.dat");
+if(f==0) {
+gotoxy(10,12);
+cout<<"NO SUCH RESERVATION IS MADE !!! PLEASE
+RETRY ";
+getch();
+
+}
+else
+{
+gotoxy(10,12);
+cout<<"RESERVATION CANCELLED"; getch();
+}
+}
+
+void main() {
+int ch,r=1000,j;
+clrscr();
+gotoxy(33,22);
+cout<<"WELCOME";
+Z:
+clrscr(); gotoxy(25,8) ;
+cout<<"RAILWAY TICKET RESERVATION"; gotoxy(25,9);
+cout<<"==========================";
+gotoxy(20,15) ; cout<<"1.TRAIN DETAILS";
+gotoxy(20,17);
+cout<<"2.UPDATE TRAIN DETAILS ";
+gotoxy(20,19);
+cout<<"3.RESERVING A TICKET ";
+gotoxy(20,21);
+cout<<"4.CANCELLING A TICKET";
+gotoxy(20,23);
+cout<<"5.DISPLAY THE PRESENT TICKET STATUS ";
+gotoxy(20,25);
+cout<<"6.EXIT";
+gotoxy(20,27);
+cout<<"ENTER YOUR CHOICE: ";
+
+
+cin>>ch; char n;
+switch(ch) {
+case 1: {
+ifstream fin("Train1.dat",ios::out);
+fin.seekg(0);
+clrscr();
+if(!fin)
+{
+clrscr();
+gotoxy(10,10);
+cout< <"ERROR IN THE FILE !!!";
+}
+else {
+clrscr();
+while(!fin.eof()) {
+fin.read((char*)&tr,sizeof(tr)); tr.display();
+}
+}
+fin.close(); goto Z;
+}
+case 2:
+clrscr();
+gotoxy(20,10);
+cout<<"ENTER THE PASSWORD " ;
+cin>>j;
+gotoxy(20,30);
+cout< <"CHECKING PLEASE WAIT ";
+getch();
+}
+{
+Y:
+ofstream fout("Train1.dat",ios::app); tr.input();
+fout.write((char*)&tr,sizeof(tr));
+fout.close();
+gotoxy(10,30);
+cout<<"DO YOU WISH TO CONTINUE UPDATING ?(Y/N)";
+cin>>n;
+if(n==y||n==Y)
+goto Y; goto Z;
+}
+else
+goto Z;
+
+case 3:
+tick.reservation(); goto Z;
+
+case 4:
+tick.cancellation(); goto Z;
+
+case 5:
+tick.display(); goto Z;
+
+case 6:
+exit(0);
+}
+getch();
+
+
+
diff --git a/bookshop/bookshop.cpp b/bookshop/bookshop.cpp
new file mode 100644
index 00000000..6a374f41
--- /dev/null
+++ b/bookshop/bookshop.cpp
@@ -0,0 +1,407 @@
+//*******************************************************
+// INCLUDED HEADER FILES
+//*******************************************************
+
+#include"stdio.h"
+#include"conio.h"
+#include"fstream.h"
+#include"stdlib.h"
+#include"dos.h"
+#include"string.h"
+#include"graphics.h"
+#include"iomanip.h"
+
+//*******************************************************
+// CLASS NAME : BOOK
+//*******************************************************
+
+class book
+{
+public:
+char name[20];
+char author[20];
+int a;
+void getdata();
+void show();
+};
+
+//*******************************************************
+// FUNCTIONS TO GET AND SHOW DATA
+//*******************************************************
+
+void book::getdata()
+{
+ cout< <"\n\" \"ENTER DETAILS ABOUT BOOK U WANT TO PURCHASE\" :\"";
+ cout<<"\n\n\n\t\tEnter Name Of Book :\t";
+ cin>>name;
+ cout< <"\n\t\tEnter Name Of Author :\t";
+ cin>>author;
+ fflush(stdin);
+ cout< <"\n\t\tEnter No. Of Copies :\t";
+ cin>>a;
+}
+void book::show()
+{
+
+cout< <"BOOK :"<=240;y=y-10,x[0]=x[0]+13,x[2]=x[2]+6,x[1]+=11,x[3]-=4,x[4]-=9)
+ {
+ fillellipse(x[0],y,20,20);setfillstyle(1,GREEN);
+ fillellipse(x[1],y,20,20); setfillstyle(1,YELLOW);
+ fillellipse(x[2],y+10,20,20);setfillstyle(1,WHITE);
+ fillellipse(300,y-15,20,20); setfillstyle(1,6);
+ fillellipse(x[3],y-5,20,20); setfillstyle(1,BLUE);
+ fillellipse(x[4],y+20,20,20); setfillstyle(1,CYAN);
+
+ clearviewport();
+for(int c=440;c<480;++c)
+{
+ setlinestyle(0,1,3);setcolor(BLACK);
+line(0,c,325,480);
+ line(680,c,325,480); }
+ delay(20);
+ }
+
+for (int c=0;c<150;++c)
+{
+setcolor(BLACK);
+fillellipse(325,240,c*1.5,c);
+delay(10);} setcolor(BLACK);settextstyle(7,0,5);
+outtextxy(115,200,"B O O K - S H O P");
+getch();
+clearviewport();
+}
+
+void main()
+{
+ clrscr();
+ int gdriver=DETECT,gmode;
+ initgraph(&gdriver,&gmode,"\\tc\\bgi");
+ graph();
+ rectangle(10,10,630,470);
+ setbkcolor(RED);
+ rectangle(10,10,630,470);
+ settextstyle(GOTHIC_FONT,0,4);
+ setcolor(WHITE);
+ outtextxy(30,35,"Developed By:-");
+ settextstyle(10,0,3);
+ outtextxy(150,100,"*iCBSE.com");
+ getch();
+ char s;
+ book b1;
+ z:
+
+ fstream f;
+ f.open("book",ios::in|ios::out|ios::app|ios::ate|ios::binary);
+ clearviewport();
+ settextstyle(10,HORIZ_DIR,3);
+ setbkcolor(GREEN);
+ rectangle(10,10,630,470);
+ outtextxy(100,15,"WHAT DO U WANT TO DO:");
+ settextstyle(SANS_SERIF_FONT,0,3);
+ outtextxy(250,100,"1 . TO BUY");
+ outtextxy(250,150,"2 . TO SHOW ALL BOOKS");
+ outtextxy(250,200,"3 . TO CHECK AVAILABILITY");
+ outtextxy(250,250,"4 . TO MODIFY");
+ outtextxy(250,300,"5 . TO DELETE");
+ outtextxy(250,350,"6 . TO EXIT");
+ int a;
+ settextstyle(7,0,5);
+ outtextxy(20,400, "ENTER UR CHOICE:");
+ f.seekg(0);
+ gotoxy(55,25);
+ cin>>a;
+ char x;
+ gotoxy(1,1);
+
+ switch (a)
+{
+
+//*******************************************************
+// CASE : 1
+// DETAILS : TO ADD A BOOK�S RECORD
+//*******************************************************
+
+case 1:
+ gotoxy(1,1);
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(RED);
+ textbackground(13);
+ textcolor(6);
+ clrscr();
+ fstream f;
+ f.open("book",ios::in|ios::out|ios::ate|ios::app|ios::binary);
+ char ans;
+ b1.getdata();
+ f.write((char *)&b1,sizeof(b1));
+ getch();
+ settextstyle(7,0,1);
+ outtextxy(250,410,"Do You Want To Continue:");
+
+ ans=getchar();
+ if(ans=='Y' || ans=='y')
+ goto z;
+ else
+ break;
+
+//*******************************************************
+// CASE : 2
+// DETAILS : TO SHOW ALL BOOKS� RECORDS
+//*******************************************************
+
+ case 2:
+ {
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(LIGHTBLUE);
+ textbackground(3);
+ textcolor(6);
+ cout< <"\n\n";
+ fstream f;
+ f.open("book",ios::in|ios::out|ios::ate|ios::app|ios::binary);
+ char ans;
+ f.seekg(0);
+ int ctr=0;
+ while(f.read((char *)&b1,sizeof(b1)) )
+{
+ ctr=ctr+1;
+ if(ctr==8)
+{
+ getchar();
+ clrscr();
+ ctr=0;
+}
+ b1.show();
+ if(f.eof()==1)
+{
+ break;
+}
+}
+ f.close();
+ settextstyle(7,0,1);
+ outtextxy(250,410,"Do You Want To Continue:");
+ cin>>ans;
+ if(ans=='y'|| ans=='Y')
+ goto z;
+ else
+{
+ closegraph();
+ exit(1);
+}
+}
+
+//*******************************************************
+// CASE : 3
+// DETAILS : TO CHECK AVAILABILITY
+//*******************************************************
+
+case 3:
+{
+ gotoxy(60,25);
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(DARKGRAY);
+ textbackground(3);
+ textcolor(5);
+ clrscr();
+ char ans;
+ ifstream f;
+ book b1;
+ char name[20];
+ char author[20]; int a;
+f.open("book",ios::in|ios::binary);
+ cout< <"\n\n\n Enter book name whose record to be seen :";
+ cin>>name;
+ do
+ {
+ f.read((char *)&b1,sizeof(b1));
+ if(f.eof()==1) {break;}
+ if(strcmp(b1.name,name)==0)
+ {
+ cout< <"\n Name :"<>name;
+ do
+ { f.read((char *)&b1,sizeof(b1));
+ if(f.eof()==1) {break;}
+ if(strcmp(b1.name,name)==0)
+ {
+ cout< <"\n Name :"<>name;
+ cout< <"\n Enter author name :";
+ cin>>author;
+ cout< <"\n Enter no. of copies :";
+ cin>>a;
+ strcpy(b1.name,name);
+ strcpy(b1.author,author);
+ b1.a=a;
+ int l=f.tellg();
+ f.close();
+ f.open("book",ios::out|ios::binary|ios::ate);
+ f.seekg(l-sizeof(b1));
+ f.write((char *)&b1,sizeof(b1));
+ }
+ }while(f);
+
+ f.close();
+ settextstyle(7,0,1);
+ outtextxy(250,410,"Do You Want To Continue:");
+ ans=getchar();
+ if(ans=='Y'||ans=='y')
+ {goto z;}
+ else
+ break;
+ }
+
+//*******************************************************
+// CASE : 5
+// DETAILS : TO DELETE A BOOK�S RECORD
+//*******************************************************
+
+ case 5:
+ {
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(BROWN);
+ setcolor(WHITE);
+ char name[20];
+ f.close();
+ f.open("video",ios::in|ios::ate|ios::binary);
+ settextstyle(7,0,3);
+ outtextxy(200,30,"DELETING:-");
+ cout< <"\n\n\n\n\n\n Enter The Name U Want To delete:\t";
+ fflush(stdin);
+ cin>>name;
+ f.seekg(0);
+ int k=0;
+ do
+ {
+ f.close();
+ f.open("book",ios::in|ios::ate|ios::binary);
+ f.seekg(k);
+ fflush(stdin);
+ f.read((char *)&b1,sizeof(b1));
+ if(f.eof())
+ break;
+ if(strcmp(b1.name,name)==0)
+ { k+=46;
+ continue;
+ }
+ else
+ {
+ f.close();
+ f.open("book2",ios::out|ios::ate|ios::binary);
+ f.write((char*)&b1, sizeof b1);
+ k+=46;
+ }}while(f);
+ f.close();
+ remove ("book");
+ rename ("book2","book");
+ cout< <"\n\n\n\n\n\tPress Any Key...";
+ getch();
+ goto z;}
+
+//*******************************************************
+// CASE : 6
+// DETAILS : TO EXIT
+//*******************************************************
+
+ case 6:
+{
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(BROWN);
+ setcolor(BLUE);
+ settextstyle(8,0,4);
+ outtextxy(150,200,"NOW YOU WANT TO GO");
+ if(getch())
+ {
+ fflush(stdin);
+ clearviewport();
+ rectangle(10,10,630,470);
+ setbkcolor(LIGHTBLUE);
+ setcolor(RED);
+ window(10,10,40,11);
+ settextstyle(8,0,4);
+ outtextxy(150,200,"\"THANKS FOR VISITING\"");
+ getch();
+ closegraph();
+ exit(1); }
+ else
+ {
+ goto z;
+ } }
+ default:
+ goto z;
+} }
\ No newline at end of file