Class 12th General Store C++ Project
Class 12th General Store C++ Project
Project
File
ACKNOWLEDGEMENT
I would like to convey my sincere gratitude to my
Teacher
Mrs. Neenu for letting me do this
project.
Last but not the least; I would like to thank all my friends
for helping me with this project.
/
*///////////////////////////////////////////////////////////////////////////
/
/
/
/
/
/
SINGHAM GENERAL STORE
/
/
/
/
/
/
/
//////////////////////////////////////////////////////////////////////////*/
#include<fstream.h>
#include<conio.h>
#include<string.h>
#include<process.h>
ofstream obj("f9.txt");
class project
{
public:
int a,amount1,price,p,q,amount,x,y;
float c,b;
char s,z,pass[30];
void employee();
void shop();
void smiley(int,int,int,int);
void cart(int,int,int,int);
void jatin();
void devesh();
void singham();
}pro;
void main()
{
clrscr();
int i,j,k,l,a;
char name[20];
cout<<"\t"<<" \n\n\n\n\n\n\n \t\t\tWelcome To
Singham General Store \n \n \n";
cout<<"\t\t\t We Welcome You With A Smile
\n \n \n";
pro.smiley(i,j,k,l);
cout<<" \n \n Enter Your Name :- ";
cin.get(name,30);
obj<<"\n\n\t\t\tSINGHAM GENERAL
STORE\n\t\t\t";
for(i=0;i<=20;++i)
obj<<"_";
obj<<"\n\n\t\t\t CUSTOMER LOG\n\t\t\t ";
for(i=0;i<=15;++i)
obj<<"_";
obj<<"\n\n\n The Customers name was :"<<name;
cout<<" \n\n 1.Enter The Shopping Mall ";
cout<<" \n\n 2.Employee Database Check ";
cout<<" \n\n 3.Exit ";
{
int i,j,k,l;
cout<<"\n\n\n";
cout<<" Item No. \t \t Item Name \t \t\tPrice
Item \n \n ";
cout<<" \n\n 1. \t \t Lays Masala Magic Chips
100g \t \t Rs 20/-";
cout<<" \n\n 2. \t \t Coca Cola Coldrink 2 ltrs\t\t
Rs 60/-";
cout<<" \n\n 3. \t \t Khaata Meetha Namkeen
105g \t \t Rs 25/- ";
cout<<" \n\n 4. \t \t Sunfeast Cream Biscuit 75g
\t \t Rs 15/- ";
cout<<" \n\n 5. \t \t Aashirwaad Atta 1Kg\t
\t \t
Rs 175/-";
cout<<" \n\n 6. \t \t Amul Butter 1Kg\t \t \t Rs
120/-";
cout<<" \n \n \n \n Now Lets Proceed With
Billing :- \n \n";
cout<<" Choose The Item No. , Quantity And
Proceed To Check out \n \n";
cout<<" Item No. \t \t \t \t Quantity \n \n ";
cin>>pro.x;
cout<<"\t \t \t \t \t ";
cin>>pro.y;
cout<<"\t \t \t \t \t \n \n";
cout<<" Do You Wanna Buy SomeThing Else
(y/n) :-";
cin>>pro.z;
if(pro.z=='y')
{
cout<<" \n \n \n \n \n \n \n Item No. \t \t \t \t
Quantity \n \n ";
cin>>pro.p;
cout<<"\t \t \t \t \t ";
cin>>pro.q;
}
if(pro.z=='n')
{
cout<<" \n \n \n \n OK . Now Lets Proceed To
Check out";
pro.amount1=0;
}
clrscr();
for(l=0;l<=79;++l)
cout<<"_";
cout<<"\n";
cout<<"\t\t\t"<<" SINGHAM GENERAL
STORE"<<endl;
for(l=0;l<=79;++l)
cout<<"_";
cout<<"\n\n";
cout<<" Product Name \t \t \t\tAmount\n";
if(pro.x==1)
{
pro.price=20;
pro.amount=pro.price*pro.y;
cout<<" \n \n Lays Masala Magic Chips 100g";
obj<<" \n\n The customer bought "<<pro.y<<"
Lays Masala Magic Chips 100g.";
cout<<"\t \t \t "<<amount<<"/-";
}
if(pro.x==2)
{
pro.price=60;
pro.amount=pro.price*pro.y;
cout<<" \n \n Coca Cola Cold Drink 2 ltrs";
obj<<" \n\n The customer bought "<<pro.y<<"
Coca Cola Cold Drink 2 ltrs.";
cout<<"\t\t\t "<<pro.amount<<"/-";
}
if(x==3)
{
price=25;
pro.amount=price*pro.y;
cout<<" \n \n Khatta Meetha Namkeen 105g";
obj<<" \n\n The customer bought "<<pro.y<<"
Khatta Meetha Namkeen 105g.";
cout<<"\t \t \t "<<pro.amount<<"/-";
}
if(x==4)
{
price=12;
pro.amount=price*pro.y;
{
obj<<"\n\n The customer had the discount
voucher.";
cout<<"\n Enter Coupon Code : ";
cin>>pro.pass;
if(stricmp(pro.pass,"NEENU"))
//stricmp
used.
cout<<" \n Sorry , Incorrect Coupon
Code. !!! \n";
else{cout<<" \n Coupon Code Accepted. You
Got 20% Discount \n ";
cout<<" \n You Have Saved 12.5 %
VAT";
if(pro.z=='y')
pro.c=0.2*(pro.amount+pro.amount1);
else
pro.c=0.2*(pro.amount);
}
}
cout<<" \n \n Bill To Be Paid :Rs."<<(pro.amount+pro.amount1)-pro.c<<"/-";
obj<<"\n\n The customer paid :Rs."<<(pro.amount+pro.amount1)-pro.c<<"/-";
cout<<" \n \n Thanks To Neenu Mam For Helping
Us Alot ";
cout<<" \n \n Made By :- Jatin Shukla & Devesh
Magotra\n";
for(l=0;l<=79;++l)
cout<<"_";
cout<<"\n";
for(l=0;l<=79;++l)
cout<<"_";
getch();
}
void project::employee()
{
clrscr();
char f[20];
int c;
cout<<"\n\n Enter PPN Password To Acess The
Database :- ";
cin>>f;
if(stricmp(f,"india"))
//stricmp used.
{
obj<<"\n\n The customer entered
incorrect PPN password.";
cout<<" \n Sorry , Incorrect
Password. !!! \n";
} else
{
obj<<"\n\n The customer entered correct PPN
password.";
cout<<" \n \n Password Accepted ";
cout<<"\n\n Which employees information would
you like to view :- ";
for(k=0;k<=8;++k)
cout<<"*";
cout<<"\n";
for(i=0;i<=2;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==40))
//if statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=0;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==33)||(j==36)||(j==38))
//if
statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=2;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==40))
//if statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=0;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==32)||(j==37)||(j==38))
//if
statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=0;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==33)||(j==34)||(j==35)||(j==37))
//if statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=2;++i)
//for loop used
{
for(j=0;j<=50;++j)
{
if((j==31)||(j==40))
//if statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
cout<<"\t\t\t\t";
for(l=0;l<=8;++l)
cout<<"*";
}
void project::cart(int i,int j,int k,int l)
{
cout<<"\t\t\t";
for(k=0;k<=4;++k)
cout<<"*";
cout<<"\n";
for(i=0;i<=2;++i)
//for loop used
{
for(j=0;j<=55;++j)
{
if(j==26+i)
//if statement used
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
cout<<" \t\t\t ";
for(k=0;k<=13;++k)
cout<<"*";
cout<<"\n";
for(i=0;i<=3;++i)
{
for(j=0;j<=55;++j)
{
if((j==28)||(j==40))
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
cout<<" \t\t\t ";
for(l=0;l<=13;++l)
cout<<"*";
cout<<"\n";
for(i=0;i<=6;++i)
{
for(j=0;j<=55;++j)
{
if((j==31+i)||(j==37-i))
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=0;++i)
{
for(j=0;j<=55;++j)
{
if((j==30)||(j==31)||(j==35)||(j==36))
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
for(i=0;i<=0;++i)
{
for(j=0;j<=55;++j)
{
if((j==31)||(j==37))
{
cout<<"*";
}
cout<<" ";
}
cout<<"\n";
}
}
REMARKS