Customer Data+Products(Purchased+Quantity+Price)+Bill Calculator+Set&Get Statement – C++ Language

#include <iostream>

using namespace std;
class customer{
private:
string name;
int phone;
float products_purchased[5];
float price[5];
float quantity[5];

public:
void setdata()
{
int pp,p,q;
cout<<“\nEnter name\n”;
cin>>name;
cout<<“\nEnter phone number\n”;
cin>>phone;
cout<<“\nEnter products purchased\n”;
for(pp=1;pp<=5;pp++)
{
cin>>products_purchased[pp];
}
cout<<“\nEnter price\n”;
for(p=1;p<=5;p++)
{
cin>>price[p];
}
cout<<“\nEnter quantity\n”;
for(q=1;q<=5;q++)
{
cin>>quantity[q];
}
}
setname(){
cout<<“Name”;
cin>>name;
}
setphone(){
cout<<“\nEnter phone number\n”;
cin>>phone;
}
setproducts_purchased(){
int pp;
cout<<“\nEnter products purchased\n”;
for(pp=1;pp<=5;pp++)
{
cin>>products_purchased[pp];
}
}
setprice(){
int p;
cout<<“\nEnter price\n”;
for(p=1;p<=5;p++)
{
cin>>price[p];
}
}
setquantity(){
int q;
cout<<“\nEnter quantity\n”;
for(q=1;q<=5;q++)
{
cin>>quantity[q];
}
}
string getname(){
return name;
}
int getphone(){
return phone;
}
float getproducts_purchased(){
return products_purchased[5];
}
float getprice(){
return price[5];
}
float getquantity(){
return quantity[5];
}

showdata()
{
int x,y,z;
cout<<“\nName of customer is:\n”<<name;
cout<<“\nPhone number is:\n”<<phone;
cout<<“\nProducts purchased are:\n”;
for(x=1;x<=5;x++)
{
cout<<“\n”<<products_purchased[x];
}
cout<<“\nPrices are:\n”;
for(y=1;y<=5;y++)
{
cout<<“\n”<<price[y];
}
cout<<“\nQuantity is:\n”;
for(z=1;z<=5;z++)
{
cout<<“\n”<<quantity[z];
}
}
calculate_bill()
{
cout<<“\nCustomer’s bill is:\n”;
cout<<“\n”<<price[1]*quantity[1] +
price[2]*quantity[2] +
price[3]*quantity[3] +
price[4]*quantity[4] +
price[5]*quantity[5];
}

};

int main(int argc,char** argv)
{
customer c1,c2;
cout<<“\nEnter data for customer 1\n”;
c1.setdata();
cout<<“\nEnter data for customer 2\n”;
c2.setdata();
cout<<“\nData of customer 1\n”;
c1.showdata();
c1.calculate_bill();
cout<<“\n Data of customer 2\n”;
c2.showdata();
c1.calculate_bill();
// max_purchased();
return 0;
}