#include<iostream>
#include<conio.h>
#include<iomanip>
void line();
using namespace std;
class tacket_system{
private:
int price,total_price,discount,family_member,member;
public:
void family_tacket()
{
cout<<"------------------------------"<<endl;
cout<<"wellcome to family tacket system="<<endl;
cout<<"------------------------------"<<endl;
cout<<"please enter your family member=";
cin>>family_member;
cout<<endl;
cout<<"please enter your price per person=";
cin>>price;
cout<<endl;
cout<<"Enter discount 20%rate=";
cin>>discount;
if(family_member<=20)
{
price=family_member*price;
price=price-discount;
cout<<endl;
cout<<"------------------------------"<<endl;
cout<<"your payable price is ="<<price<<endl;
cout<<"------------------------------"<<endl;
}else if(family_member>=8)
{
price=family_member*price;
price=price-discount;
cout<<endl;
cout<<"------------------------------"<<endl;
cout<<"your payable price is ="<<price<<endl;
cout<<"------------------------------"<<endl;
}
else if(family_member<7) {
cout<<"discount rate is not avaliable discount rate is apply family member must be greater than 7"<<endl;
cout<<"------------------------------"<<endl;
cout<<"your price is "<<family_member*price<<endl;
cout<<"------------------------------"<<endl;
}
}
void without_family()
{
cout<<"--------------------------------------"<<endl;
cout<<"WELLCOME TO WITHOUT FAMILY DEAL SYSTEM"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"please enter your price ";
cin>>price;
cout<<endl;
cout<<"please enter your member =";
cin>>member;
cout<<endl;
price=price*member;
cout<<"------------------------------"<<endl;
cout<<"your total price is ="<<price<<endl;
cout<<"------------------------------"<<endl;
}
};
int main()
{
tacket_system s1,s2;
line();
cout<<setw(70)<<"WELLCOME TO TACKET BOOKING SYSTEM"<<endl;
line();
cout<<setw(70)<<"1: family tacket deal"<<endl;
cout<<setw(78)<<"2: without family tacket deal"<<endl;
cout<<"please enter your choice =";
int choice;
cin>>choice;
if(choice==1)
{
s1.family_tacket();
}else if(choice==2)
{
s1.without_family();
}
else{
cout<<"invilid option select"<<endl;
cout<<"please try again --"<<endl;
}
}
void line()
{
cout<<setw(70)<<"---------------------------------"<<endl;
}
Bookmarks