Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Computer Science Project: Submitted By-Vaibhav Aggarwal Lakshay Banswal Class: XII C Tagore International School

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 54

COMPUTER SCIENCE

PROJECT

SUBMITTED BY-
VAIBHAV AGGARWAL
LAKSHAY BANSWAL
Class: XII C
TAGORE INTERNATIONAL SCHOOL
CERTIFICATE

This is to certify that VAIBHAV AGGARWAL and LAKSHAY


BANSWAL
of Tagore International School have successfully completed
the Computer Science Project on
“MOBIZONE”
prescribed by Ms. RUBY RANA,
during the Academic Session 2017-18
as per the Guidelines issued by CBSE.

Ms. Ruby Rana


(P.G.T., Computer Science)
Acknowledgement
Mere words won’t be able to express my gratitude and
thankfulness for the various people without whose
involvement this project couldn’t have been completed
successfully.
First of all, I would like to express my hearty gratitude for
Ms. Ruby Rana, My Computer Science Teacher without
whose support and guidance this project couldn’t have
been possible.
Lastly, I would like to end up thanking all my friends and
my parents too without whose contribution the work
entered in this file wouldn’t be a reality.
Introduction
Welcome To MOBIZONE !!!!
The Smartphone Centre…..
This store has almost all the presently available new
smartphones to match the taste of every different user.
The store employees are allowed to access the details
and check or edit the details. The customer is allowed to
view the Smartphones categorized in three sections
accordingly as on the basis of the Brand, Price and
Operating System. One can choose the desired model no.
and purchase it by entering the model no. of the desired
device in the purchase device section.
SOURCE CODE
// Header Files //
#include<iostream.h>
#include<conio.h>
#include<process.h>
#include<stdio.h>
#include<string.h>
#include<fstream.h>
// Class used in the project //
class mobi
{ char os[100];
char brand[100];
long price;
float mpr,mpf;
float screen;
char resolution_type[10];
char processor[100];
float storage;
float ram;
char version[100];
char mno[50];
int stock;
char nm[50];
char add[100];
char ph[15];
char dt[20];
public:

char* retos()
{return os;}

char* retbrand()
{return brand;}

char* retmno()
{return mno;}

long retprice()
{return price;}

char* retnm()
{return nm;}
void enter(); // function to enter record
void disp();// function to display records
void dispstock();//function to display stock record
void enterstock();//function to update stock
void bill();//function to decrement stock after every purchase
void generatebill();//function to take information to generate bill
void viewbill();//function to dissplay bill
void displaycust();//function to display customer details
};
//*****************************************************************
**********
void mobi::enter() // function definition for enter();
{ clrscr();
cout<<"\n Enter The Manufacturer's Name:- \n";
gets(brand);
cout<<"\n Enter the model no:- \n";
gets(mno);
cout<<"\n Enter The Price:- \n";
cin>>price;
cout<<"\n Enter The Operating System:-\n";
gets(os);
cout<<"\n Rear Camera:- \n";
cin>>mpr;
cout<<"\n Front Camera:- \n";
cin>>mpf;
cout<<"\n Screen Size:- \n";
cin>>screen;
cout<<"\n Resolution Type:- \n";
gets(resolution_type);
clrscr();
cout<<"\n Processor:- \n";
gets(processor);
cout<<"\n Storage:- \n";
cin>>storage;
cout<<"\n Ram:- \n";
cin>>ram;
if(strcmpi(os,"android")==0)
{cout<<"\n Enter Android Version:- \n";
gets(version);}
else if(strcmpi(os,"ios")==0)
{cout<<"\n Enter IOS Version:- \n";
gets(version);}
else if(strcmpi(os,"windows")==0)
{cout<<"\n Emter The Windows Version:- \n";
gets(version);}
cout<<"\n Enter the number of pieces \n";
cin>>stock;

}
//*****************************************************************
**********
void saveenter()//function to write records into data file
{mobi m; int n,i;
ofstream ofile;
ofile.open("employee.dat",ios::binary|ios::out|ios::app);
clrscr();
cout<<"\n Enter The No. Of Records To Be Entered \n";
cin>>n;
getch();
for(i=0;i<n;i++)
{
m.enter();
ofile.write((char*)&m,sizeof(m));
}
ofile.close();
}
//*****************************************************************
*****

void mobi::disp()// function definition for disp


{clrscr();
cout<<"\nGeneral Info.... Stock="<<stock<<"\n";
cout<<"\n Manufacturer \n";
cout<<brand;
cout<<"\n Model No. \n";
cout<<mno;
cout<<"\n Price \n";
cout<<"Rs "<<price;
cout<<"\n HARDWARE INFO.....\n";
cout<<"\n
*******************************************************\n";
gotoxy(10,13);
cout<<"|";
gotoxy(12,13);
cout<<"Resolution";
gotoxy(23,13);
cout<<"|";
gotoxy(36,13);
cout<<"|";
gotoxy(25,13);
cout<<"Rear cam";
gotoxy(38,13);
cout<<"Front cam";
gotoxy(49,13);
cout<<"|";
gotoxy(51,13);
cout<<"Screen Size";
gotoxy(64,13);
cout<<"|";
cout<<"\n
*******************************************************";
gotoxy(10,15);
cout<<"|";
gotoxy(12,15);
cout<<resolution_type;
gotoxy(23,15);
cout<<"|";
gotoxy(25,15);
cout<<mpr<<"MP";
gotoxy(36,15);
cout<<"|";
gotoxy(38,15);
cout<<mpf<<"MP";
gotoxy(49,15);
cout<<"|";
gotoxy(51,15);
cout<<screen<<"Inches";
gotoxy(64,15);
cout<<"|";
cout<<"\n
*******************************************************\n";
cout<<"\n PROCESSROR,STORAGE and RAM.....\n";
cout<<"\n ****************************************
************************\n";
gotoxy(4,21);
cout<<"|";
gotoxy(6,21);
cout<<"Processor";
gotoxy(17,21);
cout<<"|";
gotoxy(19,21);
cout<<"Storage";
gotoxy(30,21);
cout<<"|";
gotoxy(32,21);
cout<<"Ram";
gotoxy(43,21);
cout<<"|";
cout<<"\n ****************************************
************************\n";
gotoxy(4,23);
cout<<"|";
gotoxy(6,23);
cout<<processor;
gotoxy(17,23);
cout<<"|";
gotoxy(19,23);
cout<<storage<<"GB";
gotoxy(30,23);
cout<<"|";
gotoxy(32,23);
cout<<ram<<"GB";
gotoxy(43,23);
cout<<"|";
cout<<"\n ****************************************
************************\n";

gotoxy(48,18);
cout<<"OPERATING SYSTEM....";
gotoxy(51,21);
cout<<"|";
gotoxy(53,21);
cout<<"OS";
gotoxy(60,21);
cout<<"|";
gotoxy(62,21);
cout<<"Version";
gotoxy(74,21);
cout<<"|";
gotoxy(51,23);
cout<<"|";
gotoxy(53,23);
cout<<os;
gotoxy(60,23);
cout<<"|";
gotoxy(62,23);
cout<<version;
gotoxy(74,23);
cout<<"|";
cout<<"\n Press Enter \n";
getch();
}
//*****************************************************************
*********
void dispinfo() //function to search and display the desired record
{textcolor(CYAN);
mobi m;
char tmno[50];
int flag;
clrscr();
cout<<"\n Enter the model no. \n";
gets(tmno);
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{flag=0;
if(strcmpi(tmno,m.retmno())==0)
{m.disp();flag=1;break; }
}
if(flag!=1)
{cout<<"\n Invalid Input \n";
getch();
}
ifile.close();
}
//*****************************************************************
*********
void mobi::dispstock()// function to display stock details
{ textcolor(BROWN);
clrscr();
cout<<"\n STOCK DETAILS OF DESIRED MODEL \n";
cout<<"\n Model No.:-\n";
cout<<mno;
cout<<"\n Stock Left:- \n";
cout<<stock;
getch();
textcolor(GREEN);
}
//*****************************************************************
*********
void stocks() // function to take the desired model no and call dispstock();
{ mobi m; char tmno[50]; int flag=0;
cout<<"\n Enter the Model No. to check stock \n";
gets(tmno);
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi(tmno,m.retmno())==0)
{ m.dispstock(); flag=1; break; }
}
if(flag!=1)
{cout<<"\n Invalid Input \n";
getch();
}
ifile.close();

}
//*****************************************************************
*
void stockup()// function to take model no. from user and call enterstock();
{ mobi m; char tmno[50]; int flag=0;
cout<<"\n Enter the Model No. to renew stock \n";
gets(tmno);
fstream file;
file.open("employee.dat",ios::binary|ios::out|ios::in);
int pos=sizeof(m);
while(file.read((char*)&m,sizeof(m)))
{if(strcmpi(tmno,m.retmno())==0)
{ file.seekp(-pos,ios::cur);
m.enterstock();
file.write((char*)&m,sizeof(m));
flag=1;break;
}
}
if(flag!=1)
{cout<<"\n Invalid Input \n";
getch();
} file.close();
}
//*****************************************************************
*********
void mobi::enterstock()// function to update stock
{clrscr();
cout<<"\n Enter the No. of pieces available \n";
cin>>stock;

cout<<"\n UPDATED SUCCESSFULLY \n";


getch();
}
//*****************************************************************
*********
void modify()//function to modify records
{ mobi m,mnew; char tmn[50]; int flag=0,pos;
cout<<"\n Enter the model no. \n";
gets(tmn);
fstream file;
file.open("employee.dat",ios::binary|ios::in|ios::out);
while(file.read((char*)&m,sizeof(m)))
{if(strcmpi(tmn,m.retmno())==0)
{flag=1;
clrscr();
cout<<"\n Enter the new details.\n";
getch();
pos=sizeof(m);
file.seekp(-pos,ios::cur);
mnew.enter();
file.write((char*)&mnew,sizeof(mnew));
break;
}}
if(flag!=1)
{cout<<"\n Error \n";
}
file.close();
}
//*****************************************************************
********
void dispcustomer()//To display customer details
{mobi m;
ifstream ifile;
ifile.open("customer.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{ m.displaycust(); }
ifile.close();
}
//*****************************************************************
*******
void dispcustomernm()//To display customer details by name
{mobi m; char name[50];
cout<<"\n Enter the name \n";
gets(name);
ifstream ifile;
ifile.open("customer.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi(name,m.retnm())==0)
m.displaycust(); }
ifile.close();

//*****************************************************************
********
void mobi::displaycust()
{ clrscr();
cout<<"\n Name :\t"<<nm;
cout<<"\n Address :\t"<<add;
cout<<"\n Phone :\t"<<ph;
cout<<"\n Item Purchased :\t"<<mno;
cout<<"\n Press Enter For Next \n";
getch();
}
//*****************************************************************
********
void del()//to delete records
{mobi m;
char tmno[50];
cout<<"\n Enter the Model no. \n";
gets(tmno);
ifstream ifile;
ofstream ofile;
ifile.open("employee.dat",ios::binary|ios::in);
ofile.open("empnew.dat",ios::binary|ios::out);
while(!ifile.eof())
{ifile.read((char*)&m,sizeof(m));
if(strcmpi(tmno,m.retmno())!=0)
ofile.write((char*)&m,sizeof(m));}
ifile.close();
ofile.close();
remove("employee.dat");
rename("empnew.dat","employee.dat");
cout<<"\n Successfully Deleted \n";
}
//*****************************************************************
*********
void foremployee()// function for the employee to select the required option.
{
int ec=0;
while(ec!=9)
{textcolor(YELLOW);
clrscr();
cout<<"\n Select the desired option from the given list: \n";
cout<<"\n 1. To Add New Mobile Details. \n";
cout<<"\n 2. To Search Particular Mobile Details. \n";
cout<<"\n 3. To Modify Existing Mobile Details. \n";
cout<<"\n 4. To Delete A Particular Mobile Details. \n";
cout<<"\n 5. To View Customer Details. \n";
cout<<"\n 6. View Customer Details by Name \n";
cout<<"\n 7. To Check For The Stocks Left. \n";
cout<<"\n 8. To Update Stock Details. \n";
cout<<"\n 9. To Go Back To Previous Menu \n";
cin>>ec;
switch(ec)
{case 1 : saveenter();
break;
case 2 : dispinfo();
break;
case 3 : modify();
break;
case 4 : del();
break;
case 5 : dispcustomer();
break;
case 6 : dispcustomernm();
break;
case 7 : stocks();
break;
case 8 : stockup();
break;
case 9 : cout<<"\n Press ENTER \n";
break;
} }

textcolor(LIGHTGREEN);
}
//*****************************************************************
void msamsung() // funnction to search all samsung devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("samsung",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void mxiaomi() // function to search all xiaomi devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("xiaomi",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void mgionee() // function to search all gionee devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("gionee",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}

//*****************************************************************
void mmicrosoft()// function to search all microsoft devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("microsoft",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************

void mmotorolla() // function to search all motorolla devices


{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("motorolla",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
void mapple() // function to search all apple devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("apple",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void mlenovo()// function to search all lenovo devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("lenovo",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
void mhuawei()// function to search all huawei devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("huawei",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
void moneplus()// function to search all oneplus devices
{ textcolor(LIGHTRED);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("oneplus",m.retbrand())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
void brand()// function for the user to select brand
{
int b=0;
while(b!=10)
{clrscr();
cout<<"\n 1. Samsung \n";
cout<<"\n 2. Apple \n";
cout<<"\n 3. Xiaomi \n";
cout<<"\n 4. Motorolla \n";
cout<<"\n 5. Gionee \n";
cout<<"\n 6. Lenovo \n";
cout<<"\n 7. Huawei \n";
cout<<"\n 8. One Plus \n";
cout<<”\n 9. Microsoft \n”;
cout<<"\n 10. Go Back \n";
cout<<"\n Enter your choice \n";
cin>>b;
switch(b)
{ case 1 : msamsung();
break;
case 2 : mapple();
break;
case 3 : mxiaomi();
break;
case 4 : mmotorolla();
break;
case 5 : mgionee();
break;
case 6 : mlenovo();
break;
case 7 : mhuawei();
break;
case 8 :moneplus();
break;
case 9 : mmicrosoft();
break;
case 10 : cout<<"\n Press ENTER \n";
break;
}
} }
//*****************************************************************
*********
void budget1()//function definition for budget1
{ textcolor(MAGENTA);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(m.retprice()>=10000&&m.retprice()<=20000)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
*********
void budget2()//function definition for budget2
{ textcolor(MAGENTA);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(m.retprice()>=20000&&m.retprice()<=30000)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
*********
void budget3()//function definition for budget3
{ textcolor(MAGENTA);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(m.retprice()>=30000&&m.retprice()<=40000)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
*********
void budget4()//function definition for budget4
{ textcolor(MAGENTA);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(m.retprice()>=40000&&m.retprice()<=50000)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
*********
void budget5()//function definition for budget5
{textcolor(MAGENTA);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(m.retprice()>=50000)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}

//*****************************************************************
*********
void budget()// function for the user to select budget
{ int bud=0;
while(bud!=6)
{ clrscr();
cout<<"\n Select your range \n";
cout<<"\n 1. Rs10000 to Rs20000 \n";
cout<<"\n 2. Rs20000 to Rs30000 \n";
cout<<"\n 3. Rs30000 to Rs40000 \n";
cout<<"\n 4. Rs40000 to Rs50000 \n";
cout<<"\n 5. Above Rs50000 \n";
cout<<"\n 6. Go Back \n";
cout<<"\n Enter your choice \n";
cin>>bud;
switch(bud)
{case 1 : budget1();
break;
case 2 : budget2();
break;
case 3 : budget3();
break;
case 4 : budget4();
break;
case 5 : budget5();
break;
case 6 : break;
}}
}
//*****************************************************************
**********
void os1()// function definition for os1
{ textcolor(LIGHTBLUE);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("Android",m.retos())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void os2()// function definition for os2
{ textcolor(LIGHTBLUE);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("Windows",m.retos())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void os3()// function definition for os3
{ textcolor(LIGHTBLUE);
mobi m;
ifstream ifile;
ifile.open("employee.dat",ios::binary|ios::in);
while(ifile.read((char*)&m,sizeof(m)))
{if(strcmpi("IOS",m.retos())==0)
m.disp();
}
ifile.close();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void os()// function to select operating system
{int o=0;
while(o!=4)
{clrscr();
cout<<"\n Select your desired Operating System \n";
cout<<"\n 1. Android \n";
cout<<"\n 2. Windows \n";
cout<<"\n 3. IOS \n";
cout<<"\n 4. Go Back \n";
cin>>o;
switch(o)
{case 1 : os1();
break;
case 2 : os2();
break;
case 3 : os3();
break;
case 4 : break;
} }
}
//*****************************************************************
**********
void purchase()//function to call bill();
{ mobi m; char tmno[50]; int flag=0;
cout<<"\n Enter the Model No. which you have selected to buy \n";
gets(tmno);
ofstream ofile;
ofile.open("customer.dat",ios::binary|ios::out|ios::app);
fstream file;
file.open("employee.dat",ios::binary|ios::out|ios::in);
int pos=sizeof(m);
while(file.read((char*)&m,sizeof(m)))
{if(strcmpi(tmno,m.retmno())==0)
{ file.seekp(-pos,ios::cur);
m.bill();
file.write((char*)&m,sizeof(m));
m.generatebill();
ofile.write((char*)&m,sizeof(m));
flag=1;
break;
}
}

if(flag!=1)
{cout<<"\n Invalid Input \n";
getch();
} file.close();
}
//*****************************************************************
**********
void mobi::bill()
{stock=stock-1;
getch();
}
//*****************************************************************
**********
void mobi::generatebill()
{
textcolor(BLUE);
clrscr();
cout<<"\nEnter Your Good Name:-\n";
gets(nm);
cout<<"\nEnter Your Address:- \n";
gets(add);
cout<<"\nEnter Your Phone Number:- \n";
cin>>ph;
cout<<"\nEnter Today's Date:-\n";
gets(dt);
viewbill();
}
//*****************************************************************
**********
void mobi::viewbill()
{ clrscr();

cout<<"\n THANKYOU FOR VISITING \n\n\n";


cout<<"\n FONEZONE \n";
cout<<" Vikaspuri,K Block\n\n ";
cout<<"\n Name \n";
cout<<"-"<<nm;
cout<<"\n Address \n";
cout<<"-"<<add;
cout<<"\n Phone No. \n";
cout<<"-"<<ph;
cout<<"\n Date of biling \n";
cout<<"-"<<dt;
cout<<"\n Item \n";
cout<<"-"<<brand<<" ";
cout<<mno;
cout<<"\n Price\n";
cout<<"- Rs"<<price;

cout<<"\n Press Enter to Leave \n";


getch();
textcolor(LIGHTGREEN);
}
//*****************************************************************
**********
void forcustomer()// function for the customer to select desired choice
{ int c=0;
while(c!=5)
{clrscr();
cout<<"\n************** Welcome**************\n";
cout<<"\n Select Your Choice: \n";
cout<<"\n 1.View Smartphone By Brand. \n";
cout<<"\n 2.View Smartphone By Budget. \n";
cout<<"\n 3.View Smartphone By OS.\n";
cout<<”\n 4. View Smartphone By Model No.\n”;
cout<<"\n 5.Purchase Your Smartphone \n";
cout<<"\n 6.Go To Previous Menu \n";
cout<<"\n Enter your choice \n";
cin>>c;
switch(c)
{
case 1 : brand();
break;
case 2 : budget();
break;
case 3 : os();
break;
case 4: dispinfo();
break;
case 5 : purchase();
break;
case 6 : cout<<"\n Press ENTER \n";
break;
} }

}
//*****************************************************************
**********
void main() // main function
{ int x; long pwd;
textcolor(LIGHTBLUE);
clrscr();
cout<<"\n\n\n\n\n\n\t\t\t This project is made by-\n"<<"\t\t\t\t VAIBHAV
AND LAKSHAY "<<"\n \t\t\t\t Class-XII\n";
getch();

textcolor(LIGHTRED);

clrscr();
cout<<"\n\n\n\n\n\n \t\t\t\t **FONEZONE** \n";
cout<<"\n \t\t\t \"The Smartphone Centre\""<<"\n";
getch();

textcolor(LIGHTGREEN);
clrscr();
while(x!=3)
{ clrscr();
cout<<"\n Welcome to FONEZONE! \n";
cout<<"\n Enter your choice \n";
cout<<"\n1. Customer";
cout<<"\n2. Employee";
cout<<"\n3. Exit \n";
cin>>x;

if(x==1)
{forcustomer();}
if(x==2)
{cout<<"\n Enter the password \n";
cin>>pwd;
if(pwd==123456)
foremployee();
else
cout<<"\n Access Denied...\n"; }
if(x==3)
exit(0);
getch(); } getch();}
Outputs-

Customer Visits The Store

Customer Chooses To View The Smartphones By Brand


Customer Selects The Desired Brand

All The Relevant Details Are Shown One by One

1.)
2.)

vhnv

3.)
Customer Chooses To Buy One

Customer Enters The Model No. Of desired Smartphone


Another Customer Comes
He Chooses To view The Smartphones by Budget

He Selects His Budget Range


Details In That Budget Segment Are Displayed

He Dislikes And Leaves


Employee Login To System

Employee Checks For A Particular Mobile Detail


He Enters The Model No.

Details Are Shown To Him

Employee Decides To Enter New Details


He Enters The No. Of Records He Wants To Enter

Then He Enters All The Details And Details Are Successfully


Saved
Employee Wants To Delete A Particular Record
He Enters The Model No. And Record Is Deleted

Employee Decides To Check The Stock Details

Employee Enters The Model No.

Details Are Displayed


Employee Wants To Update The Stock Details

He Enters The Model No. To Update Stock

He Enters The New Stock Details & Stock Is Updated


Bibliography-
I would like to acknowledge the following sources
through which I obtained vital Information which
contributed in completion of this project.
1.) Book: Sumita Arora-Computer Science with C++
2.) http://www.91mobiles.com
3.) http://www.cplusplus.com

You might also like