Вы находитесь на странице: 1из 31

TERM PAPER

ON
Shoping mall management system?

Object oriented programming

SUBMITTED TO:-

Ms.manjit kaur

SUBMITTED BY:-

VISHEK VERMA

RC1804AO4

B.TECH M.TECH (INTEGRAGRATED)

10801337
Acknowledgements

As the professional courses do not only required the theoretical


knowledge but need to cover practical aspect too. Universities
have started conducting training programs for students. So, that
they get simple view of practical knowledge.
No work of significance can be claimed on a result of an individual
Effort and same holds true further for this project as well, for
through it carries my name the energy of many have contributed
in no small measure in completion of this project.
I am very thankful to my friend and our teacher “ms MANJIT
KAUR” who help me to make this project.

Project Description:
In this project, we will be designing a simple shopping mall using object oriented
technology. The mall will provide a soothing shopping experience for customers,
while at the same time allowing us to explore design patterns and other features object
oriented technology.
The prototype presented allows customers to purchase products
from all the shops in the Mall.

SORCE CODE

My project is an practicle project and can be used in real life..


#include<fstream.h>
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#include<stdlib.h>

struct dt
{
int dd,mm,yy;
};
date d;

class menu
{
public:
void main_menu();
void Items();
void Shops();
void transaction();
};

class issue_return
{
int m_code,b_code;
dt id;
char status;
public:
int return_bcode()
{
return(b_code);
}
int return_mcode()
{
return(m_code);
}
void issue_Item();
void return_Item();
void list_Item();
};

class Shop
{
char name[25],Floor[25];
int code,Number;
public:
void add_Shop();
void delete_Shop();
void search_Shop();
void update_Shop();
void list_Shop();
int return_code2();
};

class member
{
char name[25],Floor[30];
int code,Number;
public:
void add_member();
void delete_member();
void search_member();
void update_member();
void list_member();
int return_code1();
int ret_code()
{
return(code);
}
};

class Item
{
int code,num_of_quantity;
char title[20];
float price;
public:
void add_Item();
void delete_Item();
void search_Item();
void update_Item();
void list_Item();
int return_code();
int ret_quantity()
{
return(num_of_quantity);
}
void increase_quantity()
{
num_of_quantity++;
}
void reduce_quantity()
{
num_of_quantity--;
}
int ret_bcode()
{
return code;
}
};

int Shop::return_code2()
{
int c=0;
ifstream obj("Shop.DAT");
if(!obj)
{
return 0;
}
while(!obj.eof())
{
obj.read((char*)this,sizeof(Shop));
c=code;
}
obj.close();
return(c);
}

void Shop::add_Shop()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(120,30,"ADD NEW Shop");
ofstream obj;
code=return_code2()+1;
obj.open("Shop.DAT",ios::app);
if(!obj)
{
cout<<"File opening error";
return;
}
gotoxy(30,10);
cout<<"Code of Shop is:"<<code;
gotoxy(30,11);
cout<<"Enter Shop name:";
gets(name);
gotoxy(30,12);
cout<<"Enter Number of Shop:";
cin>>Number;
gotoxy(30,13);
cout<<"Enter Floor of Shop:";
gets(Floor);
obj.write((char*)this,sizeof(Shop));
obj.close();
closegraph();
}

void Shop::list_Shop()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,"LIST Shop");
int a=11;
ifstream obj;
obj.open("Shop.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Shop));
if(obj.eof())
break;
gotoxy(2,10);
cout<<"Shop code";
gotoxy(2,a);
cout<<code;
gotoxy(20,10);
cout<<"Shop name";
gotoxy(20,a);
cout<<name;
gotoxy(40,10);
cout<<"Shop Floor";
gotoxy(40,a);
cout<<Floor;
gotoxy(60,10);
cout<<"Shop Number";
gotoxy(60,a);
cout<<Number;
a++;
}
obj.close();
getch();
closegraph();
}

void Shop::search_Shop()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(120,30,"SEARCH Shop");
int code1,f=0;
gotoxy(22,7);
cout<<"\n Enter the code of the Shop:";
cin>>code1;
ifstream obj;
obj.open("Shop.DAT");
if(!obj)
{
gotoxy(30,10);
cout<<"File opening error.....";
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Shop));
if(code1==code)
{
f=1;
gotoxy(30,10);
cout<<"Shop code :";
cout<<code;
gotoxy(30,11);
cout<<"Shop name :";
cout<<name;
gotoxy(30,12);
cout<<"Shop Number :";
cout<<Number;
gotoxy(30,13);
cout<<"Shop Floor :";
cout<<Floor;
getch();
break;
}
}
if(f==0)
{
gotoxy(30,11);
cout<<"No Shop exists with code "<<code1;
getch();
}
obj.close();
closegraph();
}
void Shop::delete_Shop()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,"DELETE Shop");
int code2,f=0;
ifstream obj("Shop.DAT");
ofstream obj1("TEMP.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
if(!obj1)
{
cout<<"File opening error";
return;
}
gotoxy(30,10);
cout<<"Enter the code of Shop:";
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Shop));
if (obj.eof())
break;
if(code2!=code)
obj1.write((char*)this,sizeof(Shop));
else
{
f=1;
gotoxy(30,11);
cout<<"Shop deleted";
continue;
}
}
if(f==0)
{
gotoxy(30,11);
cout<<"Shop code not found....";
getch();
}
obj.close();
obj1.close();
remove("Shop.DAT");
rename("TEMP.DAT","Shop.DAT");
closegraph();
}

void Shop::update_Shop()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,"MODIFY Shop");
int f=0;
ifstream obj("Shop.DAT");
ofstream obj1("TEMP.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
if(!obj1)
{
cout<<"File opening error";
return;
}
int code2;
gotoxy(30,10);
cout<<"Enter the code of Shop:";
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Shop));
if(obj.eof())
break;
if(code2==code)
{
f=1;
gotoxy(30,10);
cout<<"Enter the new name of Shop:";
gets(name);
gotoxy(30,11);
cout<<"Enter code:";
cin>>code;
gotoxy(30,12);
cout<<" Enter new Number:";
cin>>Number;
gotoxy(30,13);
cout<<"Enter Floor:";
gets(Floor);
obj1.write((char*)this,sizeof(Shop));
}
else
obj1.write((char*)this,sizeof(Shop));
}

if(f==0)
{
gotoxy(30,11);
cout<<"Shop code not found....";
getch();
}

obj.close();
obj1.close();
remove("Shop.DAT");
rename("TEMP.DAT","Shop.DAT");
closegraph();
}

int Item::return_code()
{
int c=0;
ifstream obj("Item.DAT");
if(!obj)
{
return 0;
}
while(!obj.eof())
{
obj.read((char*)this,sizeof(Item));
c=code;
}
obj.close();
return(c);
}

void Item::add_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,"ADD NEW Item");
ofstream obj;
code=return_code()+1;
obj.open("Item.DAT",ios::app);
if(!obj)
{
cout<<"File opening error";
return;
}
gotoxy(30,14);
cout<<"\n\t\t\t Code of Item is:"<<code;
gotoxy(30,15);
cout<<"\n\t\t\t Enter title of Item:";
gets(title);
gotoxy(30,16);
cout<<"\n\t\t\t Enter price of Item:";
cin>>price;
gotoxy(30,17);
cout<<"\n\t\t\t Enter the number of quantity:";
cin>>num_of_quantity;
obj.write((char*)this,sizeof(Item));
obj.close();
closegraph();
}

void Item::list_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(120,30,"LIST OF Items");
int a=11;
ifstream obj;
obj.open("Item.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
obj.seekg(0);
while( obj.read((char*)this,sizeof(Item)))
{
gotoxy(2,10);
cout<<"Item code";
gotoxy(2,a);
cout<<code;
gotoxy(20,10);
cout<<"Item title";
gotoxy(20,a);
cout<<title;
gotoxy(40,10);
cout<<"Item price";
gotoxy(40,a);
cout<<price;
gotoxy(60,10);
cout<<"Number of quantity";
gotoxy(60,a);
cout<<num_of_quantity;
a++;
}
obj.close();
getch();
closegraph();
}

void Item::search_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(160,30,"SEARCH Item");
int code1,f=0;
gotoxy(22,7);
cout<<"\n Enter the code of the Item that you wanted to search:";
cin>>code1;
ifstream obj;
obj.open("Item.DAT");
if(!obj)
{
cout<<"\nfile opening error.....";
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Item));
if(code1==code)
{
f=1;
cout<<"\n\t\t\t Item code :";
cout<<code;
cout<<"\n\t\t\t Item title :";
cout<<title;
cout<<"\n\t\t\t Item price :";
cout<<price;
cout<<"\n\t\t\t Number of quantity:";
cout<<num_of_quantity;
getch();
break;
}
}
if(f==0)
{
cout<<"\n\t\t\tNo Item exists with code "<<code1;
getch();
}
obj.close();
closegraph();
}
void Item::delete_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(170,30,"MAIN MENU");
int code2,f=0;
ifstream obj("Item.DAT");
ofstream obj1("TEMP.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
if(!obj1)
{
cout<<"File opening error";
return;
}
gotoxy(30,13);
cout<<"Enter the code of Item:";
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Item));
if (obj.eof())
break;
if(code2!=code)
obj1.write((char*)this,sizeof(Item));
else
{
f=1;
gotoxy(30,15);
cout<<"Item deleted";
continue;
}
}
if(f==0)
{
gotoxy(30,14);
cout<<"\n\t\t\t\tItem code not found....";
getch();
}
obj.close();
obj1.close();
remove("Item.DAT");
rename("TEMP.DAT","Item.DAT");
closegraph();
}

void Item::update_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(165,30,"MODIFY Item");
int f=0;
ifstream obj("Item.DAT");
ofstream obj1("TEMP.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
if(!obj1)
{
cout<<"File opening error";
return;
}
int code2;
gotoxy(22,7);
cout<<"\n Enter the code of Item that you wanted to update:";
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(Item));
if(obj.eof())
break;

if(code2==code)
{
f=1;
gotoxy(30,12);
cout<<"Enter the title of Item:";
gets(title);
gotoxy(30,13);
cout<<"Enter price of the Item:";
cin>>price;
gotoxy(30,14);
cout<<"Enter number of quantity of Item:";
cin>>num_of_quantity;
obj1.write((char*)this,sizeof(Item));
}
else
obj1.write((char*)this,sizeof(Item));
}

if(f==0)
{
gotoxy(30,13);
cout<<"\n\t\t\tItem code not found....";
getch();
}

obj.close();
obj1.close();
remove("Item.DAT");
rename("TEMP.DAT","Item.DAT");
closegraph();
}

void issue_return::issue_Item()
{
int d1,m;
d1=DETECT;
initgraph(&d1,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(165,30,"ISSUE Item");
member mem;
date d;
int f=0;
Item o;
int cd,cd1;
ifstream obj;
obj.open("STUDENT.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}
gotoxy(30,10);
cout<<"Enter member code:";
cin>>cd;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)&mem,sizeof(member));
if(obj.eof())
break;
if(cd==mem.ret_code())
{
f=1;
break;
}
}
obj.close();
if(f==0)
{
gotoxy(30,11);
cout<<"\nMember code not found.....";
getch();
return;
}

f=0;
obj.open("Item.DAT");
if(!obj)
{
cout<<"File opening error";
return;
}

gotoxy(30,11);
cout<<"Enter Item code:";
cin>>cd1;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)&o,sizeof(Item));
if(obj.eof())
break;
if(cd1==o.ret_bcode())
{
if(o.ret_quantity()>0)
{
f=1;
gotoxy(30,12);
cout<<"Item issued.....";
status='I';
getdate(&d);
id.dd=d.da_day;
id.mm=d.da_mon;
id.yy=d.da_year;
gotoxy(30,13);
cout<<"Issue date
is:"<<id.dd<<"/"<<id.mm<<"/"<<id.yy;
getch();
}
}
}
obj.close();
if(f==0)
{
gotoxy(30,12);
cout<<"Item not available....";
getch();
return;
}

Item n;
obj.open("Item.DAT");
ofstream obj1("TEMP.DAT");
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)&n,sizeof(Item));
if(obj.eof())
break;

if(cd1==n.ret_bcode())
n.reduce_quantity();

obj1.write((char*)&n,sizeof(Item));
}
obj.close();
obj1.close();
remove("Item.DAT");
rename("TEMP.DAT","Item.DAT");
m_code=cd;

b_code=cd1;
ofstream obj2("issue.dat",ios::app);
if(!obj2)
{
cout<<"file opening error....";
getch();
return;
}
obj2.write((char*)this,sizeof(issue_return));
obj2.close();

void issue_return::list_Item()
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(165,30,"LIST Item");
int a=11;
ifstream obj;
obj.open("issue.dat");
if(!obj)
{
cout<<"File opening error";
return;
}
obj.seekg(0);
while( obj.read((char*)this,sizeof(issue_return)))
{
gotoxy(2,10);
cout<<"Member code";
gotoxy(2,a);
cout<<m_code;
gotoxy(20,10);
cout<<"Item code";
gotoxy(20,a);
cout<<b_code;
gotoxy(40,10);
cout<<"Date";
gotoxy(40,a);
cout<<id.dd<<"/"<<id.mm<<"/"<<id.yy;
gotoxy(60,10);
cout<<"Status";
gotoxy(60,a);
cout<<status;
a++;
}
getch();
obj.close();
}

void issue_return::return_Item()
{
int d1,m;
d1=DETECT;
initgraph(&d1,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(165,30,"RETURN Item");
date d;
int f=0;
int cd,cd1;
ifstream obj;
obj.open("issue.dat");
if(!obj)
{
cout<<"File opening error";
return;
}
gotoxy(30,10);
cout<<"Enter member code:";
cin>>cd;
gotoxy(30,11);
cout<<"Enter Item code:";
cin>>cd1;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(issue_return));
if(obj.eof())
break;
if(cd==m_code&&cd1==b_code)
{

f=1;
break;
}
}
obj.close();
if(f==0)
{
gotoxy(30,12);
cout<<"Member code not found.....";
getch();
return;
}

getdate(&d);
id.dd=d.da_day;
id.mm=d.da_mon;
id.yy=d.da_year;
gotoxy(30,12);
cout<<"Item returned.....";
gotoxy(30,13);
cout<<"Return date is:"<<id.dd<<"/"<<id.mm<<"/"<<id.yy;
getch();

Item n;
obj.open("Item.DAT");
ofstream obj1("TEMP.DAT");
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)&n,sizeof(Item));
if(obj.eof())
break;

if(cd1==n.ret_bcode())
n.increase_quantity();

obj1.write((char*)&n,sizeof(Item));
}
obj.close();
obj1.close();
remove("Item.DAT");
rename("TEMP.DAT","Item.DAT");

ifstream obj3;
obj3.open("ISSUE.DAT");
obj1.open("TEMP.DAT");
obj3.seekg(0);
while(!obj.eof())
{
obj3.read((char*)this,sizeof(issue_return));
if(obj3.eof())
break;

if(cd==m_code&&cd1==b_code)
status='R';

obj1.write((char*)this,sizeof(issue_return));
}
obj3.close();
obj1.close();
remove("ISSUE.DAT");
rename("TEMP.DAT","ISSUE.DAT");

void menu::main_menu()
{
int choice,choice1;
do
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(170,30,"MAIN MENU");
gotoxy(30,9);
cout<<"1.Item MENU";
gotoxy(30,10);
cout<<"2.Shop MENU";
gotoxy(30,11);
cout<<"3.MEMBER MENU";
gotoxy(30,12);
cout<<"4.ISSUE AND RETURN";
gotoxy(30,13);
cout<<"5.TO EXIT";
gotoxy(30,14);
cout<<"ENTER YOUR CHOICE:";
cin>>choice;
cleardevice();
switch(choice)
{
case 1:
cleardevice();
gotoxy(30,10);
Items();
break;

case 2:
cleardevice();
gotoxy(30,11);
Shops();
break;

case 3:
cleardevice();
gotoxy(30,12);

break;

case 4:
cleardevice();
gotoxy(30,13);
transaction();
break;

case 5:
cleardevice();
exit(0);
break;

default:
gotoxy(20,10);
setbkcolor(YELLOW);
setcolor(RED);
settextstyle(7,0,3);
outtextxy(15,150,"WRONG ENTRY
PLEASE RE-ENTER YOUR CHOICE.");
delay(2500);
}
}while(choice1!=4);
closegraph();
}

void menu::Items()
{
int choice,choice1;
Item o;
do
{
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(170,30,"Item MENU");
gotoxy(30,8);
cout<<"1.ADD RECORD";
gotoxy(30,9);
cout<<"2.DELETE RECORD";
gotoxy(30,10);
cout<<"3.SEARCH RECORD";
gotoxy(30,11);
cout<<"4.UPDATE RECORD";
gotoxy(30,12);
cout<<"5.LIST RECORD";
gotoxy(30,13);
cout<<"6.RETURN TO MAIN MENU";
gotoxy(30,14);
cout<<"7.TO EXIT";
gotoxy(30,15);
cout<<"ENTER YOUR CHOICE:";
cin>>choice;
cleardevice();
switch(choice)
{
case 1:
clrscr();
gotoxy(30,10);
o.add_Item();
break;
case 2:
clrscr();
gotoxy(30,11);
o.delete_Item();
break;
case 3:
clrscr();
gotoxy(30,12);
o.search_Item();
break;
case 4:
clrscr();
gotoxy(30,13);
o.update_Item();
break;
case 5:
clrscr();
gotoxy(30,14);
o.list_Item();
break;
case 6:
clrscr();
gotoxy(30,15);
return;
case 7:
clrscr();
exit(0);
break;
default:
cleardevice();
setbkcolor(YELLOW);
setcolor(RED);
settextstyle(7,0,3);
outtextxy(15,150,"WRONG ENTRY
PLEASE RE-ENTER YOUR CHOICE.");
delay(2500);
}
}while(choice1!=6);
closegraph();
}

void menu::Shops()
{
Shop emp;
int choice,choice1;
do
{
clrscr();
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(110,30,"Shop MENU");
gotoxy(30,8);
cout<<"1.ADD RECORD";
gotoxy(30,9);
cout<<"2.DELETE RECORD";
gotoxy(30,10);
cout<<"3.SEARCH RECORD";
gotoxy(30,11);
cout<<"4.UPDATE RECORD";
gotoxy(30,12);
cout<<"5.LIST RECORD";
gotoxy(30,13);
cout<<"6.RETURN TO MAIN MENU";
gotoxy(30,14);
cout<<"7.TO EXIT";
gotoxy(30,15);
cout<<"ENTER YOUR CHOICE:";
cin>>choice;
cleardevice();
clrscr();
switch(choice)
{
case 1:
clrscr();
gotoxy(30,10);
emp.add_Shop();
break;
case 2:
clrscr();
gotoxy(30,11);
emp.delete_Shop();
break;
case 3:
clrscr();
gotoxy(30,12);
emp.search_Shop();
break;
case 4:
clrscr();
gotoxy(30,10);
emp.update_Shop();
break;
case 5:
gotoxy(30,10);
emp.list_Shop();
break;
case 6:
clrscr();
gotoxy(30,14);
return;
case 7:
clrscr();
exit(0);
break;
default:
cleardevice();
setbkcolor(YELLOW);
setcolor(RED);
settextstyle(7,0,3);
outtextxy(15,150,"WRONG ENTRY
PLEASE RE-ENTER YOUR CHOICE.");
delay(2500);
}
}while(choice1!=6);
closegraph();
}

void menu::transaction()
{
issue_return issue;
int choice,choice1;
do
{
clrscr();
int d,m;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(80,30,"ISSUE-RETURN MENU");
gotoxy(30,11);
cout<<"1.ISSUE Item";
gotoxy(30,12);
cout<<"2.RETURN Item";
gotoxy(30,13);
cout<<"3.LIST Item";
gotoxy(30,14);
cout<<"4.RETURN TO MAIN MENU";
gotoxy(30,15);
cout<<"5.TO EXIT";
gotoxy(30,16);
cout<<"ENTER YOUR CHOICE:";
cin>>choice;
cleardevice();
clrscr();
switch(choice)
{
case 1:
clrscr();
gotoxy(30,10);
issue.issue_Item();
break;

case 2:
clrscr();
gotoxy(30,10);
issue.return_Item();
break;

case 3:
clrscr();
gotoxy(30,10);
issue.list_Item();
break;

case 4:
clrscr();
gotoxy(30,14);
return;

case 5:
clrscr();
exit(0);
break;
default:
cleardevice();
setbkcolor(YELLOW);
setcolor(RED);
settextstyle(7,0,3);
outtextxy(15,150,"WRONG ENTRY
PLEASE RE-ENTER YOUR CHOICE.");
delay(2500);
}
}while(choice1!=4);
closegraph();
}

void main()
{

int d,m,j,left=0,top=220,bottom=240;
d=DETECT;
initgraph(&d,&m,"\\tc\\bgi");
cleardevice();
for(int i=440;i>=-250;i--)
{
cleardevice();
setcolor(3);
settextjustify(1,1);
setusercharsize(1,0,1,0);
outtextxy(245,i,"WELCOME TO");
outtextxy(220,i+20,"SHOPING MALL
MANAGMENT");
outtextxy(260,i+40,"SYSTEM");
setcolor(3);
settextjustify(1,1);
setusercharsize(1,0,1,0);
outtextxy(250,i+200,"MADE BY");
outtextxy(220,i+220,"VISHEK VERMA");
outtextxy(170,i+240,"COMPUTER SCIENCE");
outtextxy(125,i+480,"LOVELY PROFESSIONAL
UNIVERSITY,PUNJAB");
delay(25);
}
for(i=0;i<=650;i++)
{
rectangle(left,top,i,bottom);
delay(10);
}
for(i=220,j=240;i>-20,j<480;i--,j++)
{
rectangle(left,i,650,j);
delay(10);
}
settextstyle(1,0,4);
setcolor(4);
outtextxy(300,230,"THANK YOU");
getch();
closegraph();

menu me;
me.main_menu();
getch();
}

Оценить