php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need CS201 Assignment No 5 Solution
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#10
#include<iostream>
#include<conio.h>
#include<stdlib.h>
using namespace std;
class Customer
{
private:
string Name;
int CustomerId;
int Spending;
int tax;
int discount;
int totalbill;
public:
void setName(string);
int setCustomerId(int);
int setSpending(int);
int getName(string);
int getCustomerId(int);
int getSpending(int);
void display()
{
cout<<"Customer Name : "<<Name<<endl<<endl<<"ID : "<<CustomerId<<endl<<endl<<"Spending : "<<Spending<<endl<<endl;
}
Customer();
Customer(string, int, int);
friend ostream & operator<<(ostream &, Customer&);
friend istream & operator>>(istream &, Customer&);
friend ostream &star(ostream &);
};
ostream & star(ostream & output)
{
output<<"*";
return output;
}
Customer::Customer()
{
Name="No Name";
CustomerId=0;
Spending=0;
}
Customer::Customer(string s, int i, int j)
{
Name=s;
CustomerId=i;
Spending=j;
}
istream & operator>>(istream & input, Customer &c)
{
cout<<"Enter the name of customer : ";
input>>c.Name;
cout<<"Enter the customer-id : ";
input>>c.CustomerId;
cout<<"Enter the Spending : ";
input>>c.Spending;
return input;
}
ostream & operator<<(ostream & output, Customer &c)
{
for(int i=0;i<55;i++)
{
if(i==25)
{
output<<"Customer Bill Information";
}
else
{
output<<star;
}
}
output<<endl;
output<<"Name :";
for(int a=0;a<21;a++)
{
if(a==20)
{
output<<c.Name<<endl;
}

else
{
output<<star;
}
}
output<<"ID :";
for(int a=0;a<23;a++)
{
if(a==22)
{
output<<c.CustomerId<<endl;
}

else
{
output<<star;
}
}
output<<"Spending :";
for(int a=0;a<19;a++)
{
if(a==18)
{
output<<c.Spending<<endl;
}

else
{
output<<star;
}
}

if(c.Spending<=5000)
{
c.tax=(c.Spending*5)/100;
c.discount=(c.Spending*1)/100;
c.totalbill=c.Spending+c.tax-c.discount;
output<<"Tax :";
for(int a=0;a<27;a++)
{
if(a==26)
{
output<<c.tax<<endl<<"Discount :";
for(int a=0;a<19;a++)
{
if(a==18)
{
output<<c.discount<<endl<<"Total Bill :";
for(int a=0;a<17;a++)
{
if(a==16)
{
output<<c.totalbill<<endl;
}

else
{
output<<star;
}
}

}

else
{
output<<star;
}
}


}

else
{
output<<star;
}
}

}
else if(c.Spending>5000 & c.Spending<10000)
{
c.tax=(c.Spending*10)/100;
c.discount=(c.Spending*2)/100;
c.totalbill=c.Spending+c.tax-c.discount;
output<<"Tax :";
for(int a=0;a<27;a++)
{
if(a==26)
{
output<<c.tax<<endl<<"Discount :";
for(int a=0;a<19;a++)
{
if(a==18)
{
output<<c.discount<<endl<<"Total Bill :";
for(int a=0;a<17;a++)
{
if(a==16)
{
output<<c.totalbill<<endl;
}

else
{
output<<star;
}
}

}

else
{
output<<star;
}
}


}

else
{
output<<star;
}
}

}

else if(c.Spending>10000)
{
c.tax=(c.Spending*15)/100;
c.discount=(c.Spending*3)/100;
c.totalbill=c.Spending+c.tax-c.discount;
output<<"Tax :";
for(int a=0;a<27;a++)
{
if(a==26)
{
output<<c.tax<<endl<<"Discount :";
for(int a=0;a<19;a++)
{
if(a==18)
{
output<<c.discount<<endl<<"Total Bill :";
for(int a=0;a<17;a++)
{
if(a==16)
{
output<<c.totalbill<<endl;
}

else
{
output<<star;
}
}

}

else
{
output<<star;
}
}


}

else
{
output<<star;
}
}

}
return output;
}

main()
{
Customer obj;
cin>>obj;
cout<<obj;
system("pause");
}
Reply


Messages In This Thread
Need CS201 Assignment No 5 Solution - by sajida - 02-02-2011, 02:33 AM
Need CS201 Assignment No 5 Solution - by sajida - 02-02-2011, 02:48 AM
Need CS201 Assignment No 5 Solution - by Xpert - 02-02-2011, 02:58 AM
Need CS201 Assignment No 5 Solution - by gm mughal - 06-30-2011, 12:04 AM
Need CS201 Assignment No 5 Solution - by m_ijaz - 07-05-2012, 09:04 PM
Need CS201 Assignment No 5 Solution - by Xpert - 07-05-2012, 10:39 PM
Need CS201 Assignment No 5 Solution - by m_ijaz - 07-06-2012, 04:37 PM
Need CS201 Assignment No 5 Solution - by m_ijaz - 07-06-2012, 04:38 PM
Need CS201 Assignment No 5 Solution - by m_ijaz - 07-06-2012, 04:45 PM
Need CS201 Assignment No 5 Solution - by Xpert - 07-06-2012, 04:58 PM
Need CS201 Assignment No 5 Solution - by Xpert - 07-13-2010, 11:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SEO in Simple Words: How a VU Student Can Write a Clearer Assignment or Blog Post admin 0 33 11-01-2026, 05:11 AM
Last Post: admin
  Cs403 Assignment 3 Helping material May 8,2010 viki 1 5,266 04-28-2020, 03:19 PM
Last Post: ClaireBeauc
  cs301 assignment no 3 Solution 20 January 2016 Vuhelper 0 11,127 01-20-2016, 03:32 PM
Last Post: Vuhelper
  CS201 Assignment vo 3 Solution 20th January 2016 Vuhelper 2 2,651 01-20-2016, 03:28 PM
Last Post: Vuhelper
  CS101 Assignment no 3 Solution 20th January 2016 Vuhelper 0 2,325 01-20-2016, 03:25 PM
Last Post: Vuhelper
  SOC101 INTRODUCTION TO SOCIOLOGY assignment no 3 Solution 20 January 2016 Vuhelper 0 1,907 01-20-2016, 03:19 PM
Last Post: Vuhelper
  CS402 Assignment No 4 Solution & Discussion Xpert 0 2,142 08-01-2015, 02:33 AM
Last Post: Xpert
  cs101 Assignment No. 1 Solution 21 may spring 2015 semester Xpert 0 2,952 05-21-2015, 12:41 AM
Last Post: Xpert
  Assignment solution eng 301 due date 20 may 2015 rumesa khan 3 4,577 05-20-2015, 01:34 AM
Last Post: Xpert
  PHY301 Circuit Theory Assignment No. 1 idea Solution spring may 2015 semester Xpert 0 1,603 05-15-2015, 03:52 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 2 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support