www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Dear Students,

The solutions of assignment # 5 that are posted here till now are not correct, The perfect solution consist of less then 100 lines of code, there are many wrong solutions of more then 300 lines of code, be careful, think before submit, as previous i must post perfect solution before grace day, wait for perfection,

keep smiling

Best of Luck

Views: 2055

### Replies to This Discussion

Dear Students,

The solutions of assignment # 5 that are posted here till now are not correct, The perfect solution consist of less then 100 lines of code, there are many wrong solutions of more then 300 lines of code, be careful, think before submit, as previous i must post perfect solution before grace day, wait for perfection,

keep smiling

Best of Luck

Tahir bhai y r u delaying it on grace day???? light ki kitni prob hai & kbhi lms mein prob ajati hai..plz it could b risky..ap ne sol dena hi hai to plz aj last date hai aj de dein..it will b very kind of u...

Thank you..!!

plz correct solution aj hi upload kry.....

Tahir mere bhia,, k do jani aj he,,,, q wait krwa rahy ho hum ghribo ko

inta wait kon karta hi light chali jaye gey

#include<iostream.h>
#include<conio.h>

using namespace std;

// ************************ Customer Class **************************

class Customer
{
private:      // ************* Private Data Members
char Name[100];
int CustomerID, Spending ;
public:
Customer();              // Simple Constructor
friend ostream &operator ( ostream & , Customer & ) ; // Overloaded operator
friend istream &operator >> (istream & , Customer & ) ; // Overloaded >> operator
};

int main()
{
cout "\n" ;
Customer obj ;
cin >> obj ;
cout obj ;

system ("PAUSE") ;
return 0;
}

/* ************************ Constructor Definition */
Customer::Customer()
{
strcpy ( Name , "No Name" ) ;
CustomerID = Spending = 0 ;
}

/* ************************ operator   Definition */
ostream &operator ( ostream &out , Customer &obj )
{
out "\n\n**************************Customer Billing Information*************************\n\n";
out "  Name     *************** " obj.Name "\n";
out "  ID       *************** " obj.CustomerID "\n";
out "  Spending *************** " obj.Spending "\n";

float Tax, Discount;

if(obj.Spending<5000)
{
Tax = obj.Spending*.05 ;
Discount = obj.Spending*.01 ;
}

else if(obj.Spending<10000)
{
Tax = obj.Spending*.1 ;
Discount = obj.Spending*.02 ;
}

else
{
Tax = obj.Spending*.15 ;
Discount = obj.Spending*.03 ;
}

out "  Tax      *************** " Tax "\n" ;
out "  Discount *************** " Discount "\n" ;
out "  Total    *************** " obj.Spending+Tax-Discount "\n" ;
return out;
}

/* ************************ operator >>  Definition */
istream &operator >> (istream &in, Customer &obj)
{
cout " Enter name of the customer : " ;
in.getline( obj.Name , 100 , '\n' ) ;
cout " Enter ID of the customer : " ;
return in;
}

check this

this is not the required solution

17 errors hain..........

TAHIR PLZ AP SOL JALDI UPLOAD KR DAIN NA ..... YAHN TO CAMPUS MAI B LITE NAI HOTI ....!

hmmm

good keep it up

i hope tahir  u must upload the solution today...............

intahi beycar site hi

useless website

1

2

3

## Latest Activity

4 hours ago
4 hours ago
Derrick Bozem is now a member of Virtual University of Pakistan
8 hours ago
yesterday
yesterday
yesterday
yesterday
yesterday