$$ Canteen Billing System Without Using Data Structure
/*
Name: Canteen Bill Software.
Copyright: Self made
Author: Ketan Kulkarni.
Date: 08-12-19 13:47
Description:Without using data structure and using simple C++,Canteen bill software.
*/
#include<iostream>
#include<stdlib.h>
#include<ctime>
using namespace std;
class soft
{
int a,d,flag;
int z;
int m,n,h,x;
public:
soft()
{
n=x=1;
flag=0;
}
void accept();
void just();
void total();
void pay();
void final();
};
void soft::accept()
{
cout<<" Enter key";
cin>>a;
if(a==0)
{
flag=0;
}
else if(a==1)
{
flag=1;
}
else if(a==2)
{
flag=2;
}
else if(a==3)
{
flag=3;
}
else if(a==4)
{
flag=4;
}
else if(a==5)
{
flag=5;
}
else if(a==6)
{
flag=6;
}
else if(a==7)
{
flag=7;
}
else
{
cout<<"Invalid Bhaii";
}
}
void soft::just()
{
cout<<"\n how many item want";
cin>>d;
}
void soft::total()
{
if(flag==0)
{
m=d*10;
}
else if(flag==1)
{
m=d*10;
}
else if(flag==2)
{
m=d*10;
}
else if(flag==3)
{
m=d*10;
}
else if(flag==4)
{
m=d*10;
}
else if(flag==5)
{
m=d*50;
}
else if(flag==6)
{
m=d*30;
}
else if(flag==7)
{
m=d*40;
}
cout<<"\n The Total Amount to pay= "<<m;
}
void soft::pay()
{
cout<<"\n\n";
cout<<"\n Select Payment Mode:-\n 1.Cash\n 2.Phone Pay\n 3.Paytm\n 4.Google Pay\n 5.Amazon Pay";
cin>>h;
if(h==1)
{
z=1;
}
else if(h==2)
{
z=2;
}
else if(h==3)
{
z=3;
}
else if(h==4)
{
z=4;
}
else if(h==5)
{
z=5;
}
cout<<"\n Payment Recieved...\n";
}
void soft::final()
{
time_t now=time(0);
char*dt=ctime(&now);
cout<<"\n\n";
cout<<" Printing Bill.........";
cout<<"\n\n\n\n";
cout<<" BSIOTR Canteen \n";
cout<<"Bill NO:-"<<x<<"\t"<<dt;
cout<<"\n---------------------------------------------------";
cout<<"\n Item Name Qty Rate Amount ";
cout<<"\n---------------------------------------------------";
if(flag==0)
{
m=d*10;
cout<<"\n Pohe "<<d<<"\t"<<n*10<<"\t"<<m;
}
else if(flag==1)
{
m=d*10;
cout<<"\n Upama "<<d<<"\t"<<n*10<<"\t"<<m;
}
else if(flag==2)
{
m=d*10;
cout<<"\n vadapav "<<d<<"\t"<<n*10<<"\t"<<m;
}
else if(flag==3)
{
m=d*10;
cout<<"\n Samosa "<<d<<"\t"<<n*10<<"\t"<<m;
}
else if(flag==4)
{
m=d*10;
cout<<"\n Tea "<<d<<"\t"<<n*10<<"\t"<<m;
}
else if(flag==5)
{
m=d*50;
cout<<"\n Rice plate "<<d<<"\t"<<n*50<<"\t"<<m;
}
else if(flag==6)
{
m=d*30;
cout<<"\n Meduvada Sambar "<<d<<"\t"<<n*30<<"\t"<<m;
}
else if(flag==7)
{
m=d*40;
cout<<"\n Pavbhaji "<<d<<"\t"<<n*40<<"\t"<<m;
}
else
{
cout<<" ";
}
cout<<"\n---------------------------------------------------";
cout<<"\n Total Amount:- Rs."<<m;
//cout<<"\n---------------------------------------------------";
//cout<<"\n Thank You!!! ";
cout<<"\n---------------------------------------------------";
if(z==1)
{
cout<<"\nThe Payment Recieved by Cash...Thank You!";
}
else if(z==2)
{
cout<<"\nThe Payment Recieved By UPI On PHONEPAY...Thank You!";
}
else if(z==3)
{
cout<<"\nThe Payment Recieved By UPI on PAYTM...Thank You!";
}
else if(z==4)
{
cout<<"\nThe Payment Recieved By UPI on GOOGLEPAY...Thank You!";
}
else if(z==5)
{
cout<<"\nThe Payment Recieved By UPI on AMAZONPAY...Thank You!";
}
cout<<"\n---------------------------------------------------";
cout<<"\n -KK IT Solutions Pvt.Ltd.";
cout<<"\n Mo:-8484833042";
cout<<"\n\n\n";
x++;
}
int main()
{
soft o;
char ch;
do
{
o.accept();
o.just();
o.total();
o.pay();
o.final();
cout<<"Do you wanna continue";
cin>>ch;
}
while(ch=='y');
return 0;
}
Keys:-
Pohe-0
Umpma-1
vadapav-2
samosa-3
Tea-4
Rice Plate-5
Medu vada-6
Pavbhaji-7
OUTPUT:-
Comments
Post a Comment