Oops Microproject Final
Oops Microproject Final
ON
BY
CERTIFICATE
This is to certify that the Project report entitled
Submitted by:
Is a confide work carried out by them under the supervision of Ms.Thorat J.B.
(Principal)
Place:-Someshwarnagar
Prof.Hajare S.K
ACKNOWLEDGEMENT
Yours Sincerely,
• Source code:-
#include<iostream.h>
#include<conio.h>
using namespace std;
class shop { public:
void start()
{
char s; float OnlineShopping(void);
cout<<"*******WELCOME********"<<endl;
start:
cout<<"Enter 's/S' to Start
Shopping"<<endl; cin>>s; system("CLS");
if(s=='s'||s=='S')
{
calculate();
}
else
{
cout<<"Sorry,you have entered wrong input"<<endl;
goto start;
}
} void
calculate()
{
char yn;
float TotalAmount=OnlineShopping();
system("CLS"); cout<<"your total amount is
"<<TotalAmount<<"Rs"<<endl; cout<<"do you want to
shop again? enter y to yes and n to no"<<endl;
cin>>yn;
system("CLS");
if(yn=='y'|| yn=='Y')
{
start();
}
Xiaomi mi 11x"<<"price
:"<<"Rs.32000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl; float q,k,c;//q=quantity c=item no.k= total price
cout<<"(1)enter 1 to buy smartphone "<<endl;
cout<<"(2)enter 2 to buy laptop "<<endl; cout<<"(3)enter
3 to buy Headphones "<<endl; cout<<"(4)enter 4 to buy
watch "<<endl;//enter catogery here
cin>>choice;
system("CLS"); if(choice==1)
{
mobile:
cout<<"(1) Iphone 11"<<"price
:"<<"RS.40000"<<endl;
cout<<"(2) Realme x7"<<"price
:"<<"Rs.27000"<<endl; cout<<"(3)
Samsung galaxy"<<"price
:"<<"Rs.24000"<<endl; cout<<"(4)
Xiaomi mi 11x"<<"price
:"<<"Rs.32000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*40000;
}
else if(c==2)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*27000;
}
else if(c==3)
{
cout<<"enter quantity"<<endl; cin>>q;
k=q*24000;
}
else if(c==4)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*32000;
}
else{
cout<<"you have entered invalid
number"<<endl;
goto mobile;
}
}
else if(choice==2)
{
laptop:
cout<<"(1) HP 15s"<<"price :"<<"RS.45000"<<endl;
cout<<"(2) Apple Macbook "<<"price
:"<<"Rs.100000"<<endl; cout<<"(3)
Lenovo"<<"price :"<<"Rs.50000"<<endl; cout<<"(4) HP
pavalion"<<"price
:"<<"Rs.56000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*46000; else{
cout<<"you have entered invalid
number"<<endl;
goto mobile;
}
}
else if(choice==2)
{
laptop:
cout<<"(1) HP 15s"<<"price :"<<"RS.45000"<<endl;
cout<<"(2) Apple Macbook "<<"price
:"<<"Rs.100000"<<endl; cout<<"(3)
Lenovo"<<"price :"<<"Rs.50000"<<endl; cout<<"(4) HP
pavalion"<<"price
:"<<"Rs.56000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*46000;
}
else if(c==2)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*100000;
}
else if(c==3)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*50000;
}
else if(c==4)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*56000;
}
else{
cout<<"you have entered invalid
number"<<endl;
goto laptop;
}
}
else if(choice==3)
{
headphone:
cout<<"(1)BOat 370"<<"price :"<<"RS.1200"<<endl;
cout<<"(2) Apple airpod "<<"price
:"<<"Rs.18000"<<endl; cout<<"(3) Realme
q2"<<"price :"<<"Rs.1600"<<endl; cout<<"(4) Oneplus
Buds"<<"price
:"<<"Rs.3500"<<endl;
cout<<"enter the item no. which you want to
buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl; cout<<"you have entered invalid
number"<<endl;
goto laptop;
}
}
else if(choice==3)
{
headphone:
cout<<"(1)BOat 370"<<"price :"<<"RS.1200"<<endl;
cout<<"(2) Apple airpod "<<"price
:"<<"Rs.18000"<<endl; cout<<"(3) Realme
q2"<<"price :"<<"Rs.1600"<<endl; cout<<"(4) Oneplus
Buds"<<"price
:"<<"Rs.3500"<<endl;
cout<<"enter the item no. which you want to
buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*1200;
}
else if(c==2)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*18000;
}
else if(c==3)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*1600;
}
else if(c==4)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*3500;
}
else{
cout<<"you have entered invalid
number"<<endl;
goto laptop;
}
}
else if(choice==3)
{
watch:
cout<<"(1)DIzo"<<"price :"<<"RS.5200"<<endl;
cout<<"(2) Apple watch "<<"price
:"<<"Rs.18000"<<endl; cout<<"(3) Realme
"<<"price :"<<"Rs.4600"<<endl; cout<<"(4)
samsung"<<"price :"<<"Rs.5000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl; else{
cout<<"you have entered invalid
number"<<endl;
goto laptop;
}
}
else if(choice==3)
{
watch:
cout<<"(1)DIzo"<<"price :"<<"RS.5200"<<endl;
cout<<"(2) Apple watch "<<"price
:"<<"Rs.18000"<<endl; cout<<"(3) Realme
"<<"price :"<<"Rs.4600"<<endl; cout<<"(4)
samsung"<<"price :"<<"Rs.5000"<<endl; cout<<"enter the
item no. which you want to buy"<<endl;
cin>>c;
if(c==1)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*5200;
}
else if(c==2)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*18000;
}
else if(c==3)
{
cout<<"enter quantity"<<endl;
cin>>q;
k=q*4600;
}
else if(c==4)
{
cout<<"enter quantity"<<endl; cin>>q;
k=q*5000;
}
else{
cout<<"you have entered invalid
number"<<endl;
goto watch;
}
}
}
}; int
main ()
{
shop a;
a.start();
getch();
}
• Output:-
• Conclusion :-
• Reference
1. https://www.ecwid.com/blog/mobile - shopping -
2.OOP learning manual.
3. https://www.youtube.com/
4. https://www.w3schools.com/