Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- using namespace std;
- class imp
- {
- public:
- void fn()
- {
- cout<<" --------****************************------"<<endl;
- cout<<" SUPER MARKET BILLING SYSTEM"<<endl;
- cout<<" --------****************************------"<<endl;
- cout<<"1.BILLING A CUSTOMER.."<<endl;
- cout<<"2.DETAILS OF THE ITMES.."<<endl;
- cout<<"3.EXIT.."<<endl<<endl;
- }
- };
- class details
- {
- public:
- void fn2()
- {
- cout<<" ------------DETAILS OF THE ITEMS---------------"<<endl<<endl<<endl;
- cout<<"->NAME |->CODE |->PRICE"<<endl;
- cout<<"1.Air Wick |1000 |500/- "<<endl;
- cout<<"2.Appy Fizz |1001 |50/- "<<endl;
- cout<<"3.BB Cream |1002 |350/- "<<endl;
- cout<<"4.Bedsheet |1003 |800/- "<<endl;
- cout<<"5.Coffee beans |1004 |400/- "<<endl;
- cout<<"6.Dairy Milk Silk |1005 |150/- "<<endl;
- cout<<"7.Foxy Organic |1006 |400/- "<<endl;
- cout<<"8.Gelatin |1007 |20/- "<<endl;
- cout<<"9.Hershey's Syrup |1008 |200/- "<<endl;
- cout<<"10.Diet Coke |1009 |50/- "<<endl;
- }
- };
- class bill
- {
- public:
- string a;
- int a1,b1,b,a2,b2;
- int grand;
- void fn3()
- {
- cout<<"Enter the name of the product or alphabet or code of the product to order: "<<endl;
- cin>>a;
- cout<<endl;
- if(a=="a" || a=="A")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.Air wick"<<endl<<"2.Appy Fizz"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*500;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- }
- else if(a=="airwick" ||a=="air")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*500;
- }
- else if(a=="appyfizz" || a=="appy")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- else if(a=="1000" || a=="1001")
- {
- if(a=="1000")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*500;
- }
- else if(a=="1001")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- else if(b!=1 ||b!=2)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="b" || a=="B")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.BB Cream"<<endl<<"2.Bedsheet"<<endl<<"3.Brown Bread"<<endl<<"4.Bournvita"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*350;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*800;
- }
- else if(b==3)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*60;
- }
- else if(b==4)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*500;
- }
- else if(b!=1 ||b!=2 ||b!=3 ||b!=4)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="bbcream" ||a=="bb")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*350;
- }
- else if(a=="bedsheet" ||a=="bedsheets")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*800;
- }
- else if(a=="brownbread" ||a=="bread")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*60;
- }
- else if(a=="bournvita" ||a=="bourn")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*500;
- }
- else if(a=="1002" || a=="1003" || a=="1012" || a=="1025")
- {
- if(a=="1002")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*350;
- }
- else if(a=="1003")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*800;
- }
- else if(a=="1012")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*60;
- }
- else if(a=="1025")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*500;
- }
- }
- else if(a=="c" || a=="C")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.Coffee Beans"<<endl<<"2.Chocolate Cookies"<<endl<<"3.Classmate Notebook"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*150;
- }
- else if(b==3)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*65;
- }
- else if(b!=1 ||b!=2 ||b!=3)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="coffeebeans" ||a=="coffee")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- else if(a=="chocolatecookies" || a=="cookies")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*150;
- }
- else if(a=="classmatenotebook" || a=="classmate" ||a=="notebook")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*65;
- }
- else if(a=="1004" || a=="1013" ||a=="1026")
- {
- if(a=="1004")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- else if(a=="1013")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*150;
- }
- else if(a=="1026")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*65;
- }}
- else if(a=="d" || a=="D")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.Dairy Milk Silk"<<endl<<"2.Diet Coke"<<endl<<"3.Dove Shampoo"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*150;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- else if(b==3)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*190;
- }
- else if(b!=1 ||b!=2 ||b!=3)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="dairymilksilk" ||a=="dairymilk" ||a=="silk" ||a=="chocolate")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*150;
- }
- else if(a=="dietcoke" || a=="coke")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- else if(a=="doveshampoo" || a=="dove" ||a=="shampoo")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*190;
- }
- else if(a=="1005" || a=="1009" ||a=="1022")
- {
- if(a=="1005")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*150;
- }
- else if(a=="1009")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*50;
- }
- else if(a=="1022")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*190;
- }
- }
- else if(a=="e" || a=="E")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.Eggs"<<endl<<"2.Eggplant"<<endl<<"3.Eraser"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*10;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*15;
- }
- else if(b==3)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*5;
- }
- else if(b!=1 ||b!=2 ||b!=3)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="eggs" ||a=="egg")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*10;
- }
- else if(a=="eggplant" || a=="brinjal")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*15;
- }
- else if(a=="eraser")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*5;
- }
- else if(a=="f" || a=="F")
- {
- cout<<"Choose your item: "<<endl;
- cout<<"1.Foxy Organic"<<endl<<"2.Frooti"<<endl;
- cin>>b;
- if(b==1)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- else if(b==2)
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*70;
- }
- else if(b!=1 ||b!=2)
- {
- cout<<"Invalid Choice..Please Try again!"<<endl;
- }
- }
- else if(a=="foxyorganic" ||a=="organic" ||a=="foxy")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- else if(a=="frooti")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>b1;
- grand=b1*70;
- }
- else if(a=="1006")
- {
- cout<<"Enter Quantity:"<<endl;
- cin>>a1;
- grand=a1*400;
- }
- cout<<"Grand total is:"<<grand<<endl;
- }
- };
- int main()
- {
- int n;
- string h;
- imp a;
- a.fn();
- cout<<"Enter your choice: "<<endl;
- cin>>n;
- if(n==1)
- {
- bill b;
- b.fn3();
- cout<<"order more? Y/N";
- cin>>h;
- if(h=="y" || h=="Y")
- {
- b.fn3();
- }
- else if(h=="n" || h=="N")
- {
- cout<<"Thanx for shopping";
- }
- }
- else if(n==2)
- {
- add a1;
- add a1;
- a1.fn4();
- }
- else if(n==3)
- {
- details d1;
- d1.fn2();
- }
- else if(n==4)
- {
- cout<<"Successfully exited";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement