We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# cs201 3rd assignment solution

#include <iostream.h>
#include <stdlib.h>
class Customer
{
public:
void display();
void setName(int i);
void setCustomer_id(int i);
void setSpending(int i);

int getName();
int getCustomer_id();
int getSpending();

Customer();
Customer(int, int , int);
// Customer(int, int, int);
~Customer ();

private:
int FnlBill;
int customer_id;
int spending;
int name;
friend float dis1FnlBill ( Customer ) ;
friend float dis2FnlBill ( Customer ) ;
friend float dis3FnlBill ( Customer ) ;
};
Customer::Customer()
{
name= 0;
customer_id = 0;
spending = 0;
}

Customer::Customer(int thename, int thecustomer_id , int thespending)
{
name = thename;
customer_id = thecustomer_id;
spending = thespending;

}
Customer::~Customer()
{
}
void Customer::display()
{
cout getName() getCustomer_id() getSpending();
}
void Customer::setName(int i)
{
name = i ;
}
void Customer::setCustomer_id(int i)
{
customer_id = i;
}
void Customer::setSpending(int i)
{
spending = i;
}

int Customer::getName()
{
return name;
}
int Customer::getCustomer_id()
{
return customer_id;
}
int Customer::getSpending()
{
return spending;
}
void FnlBill(Customer *d, int )
{
// d->FnlBill ; // Modify private data
}

int main()
{

Customer Bill1, Bill2(1,2,3), Bill3(4,5,6); // taking objects of Date class
Bill1.display();
Customer *aptr;
aptr = new Customer [1];
delete [] aptr;
Bill2.display();
Customer *bptr;
bptr = new Customer [1];
delete [] bptr;
int name;
int customer_id;
int spending;
cout "Enter Customer Name" endl;
cin >> name ;
cout "Enter Customer customer_id" endl;
cin >> customer_id ;
cout "Enter Customer spendings" endl;
cin >> spending ;
Bill3.display();
Customer *cptr;
cptr = new Customer [1];
delete [] cptr;
/*float spend,;
cout "Please enter total spendings " ;
endl;
cin >> spend;
if ( spend < 5000 )
{
cout "The Bill is : " dis1FnlBill(Bill3(4,5,6)) endl;
}
else if (spend => 5000 && < 10000)
{
cout "The Bill is : " dis2FnlBill(Bill3(4,5,6)) endl;
}
else if ( spend => 10000 )
{
cout "The Bill is : " dis3FnlBill(Bill3(4,5,6)) endl;
}
else
{
cout "Pleae epend some thing" endl;
}
Customer *cptr; // Declared a pointer dptr to MyPointer class object
cptr = new Customer [1]; // Created 10 objects of MyDate and assigned the
// pointer to the first object to dptr pointer variable.
delete [] cptr; // Deleted (freed) the assigned memory to the objects
//display();*/
system ("pause");
}
/*
float dis1FnlBill ( Bill3(4,5,6))
{
return ( (spend+(5/spend*100))-(1/spend*100)); // Addition of tax
}
float dis2FnlBill ( Bill3(4,5,6))
{
return ( (spend+(10/spend*100))-(2/spend*100)); // Addition of tax
}
float dis3FnlBill ( Bill3(4,5,6))
{
return ( (spend+(15/spend*100))-(3/spend*100)); // Addition of tax
}
*/

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 240

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

### Replies to This Discussion

YAAR YA OPEN NAHI HO RAHI HAI YAAR SAHI SOLUTION SEND KERO

mail me at:

tahirramzan1@yahoo.com

## Latest Activity

PACA Officer updated their profile
19 minutes ago
+ıllıllı \$µǥąя ǥ€ɲɨµ\$ ıllıllı+ liked 彡ＪＫ彡❤️'s discussion عید الفطر 2020
47 minutes ago
48 minutes ago
+++ Haniya+++ liked +!!-Meesha's blog post modernism,,,,, tell me agree?
1 hour ago
+++ Haniya+++ liked Maham Raza.'s discussion Main Khud Ko Tor Betha Hon...!
1 hour ago
+++ Haniya+++ liked Destruido's discussion arrange the spellings
1 hour ago
1 hour ago
Destruido posted a discussion

### Find the name of fruits

1 hour ago
Destruido replied to Destruido's discussion arrange the spellings
1 hour ago
Salman Baig joined + M.Tariq Malik's group

### MGMT614 Supply Chain Management

2 hours ago
Salman Baig joined + M.Tariq Malik's group

### MGT101 Financial Accounting

2 hours ago
Salman Baig joined + M.Tariq Malik's group

2 hours ago

1

2

3