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

Looking For Something at vustudents.ning.com? Click Here to Search

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

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

complete solutions

I commented destruction part.

and please don't upload this .cpp other wise we both will ............. ,

ENJOYEEEEE

+ How to Follow the New Added Discussions at Your Mail Address?

+ 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?


See Your Saved Posts Timeline

Views: 4985

.

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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

mane ye program khud bnaya hai jo sulution dy rhy hain bht complex hai or eska solution bht he easy ha.

Output & program is here..

Attachments:

cs304 complete solution without errors may 2016

Attachments:

recName="";
recAddress ="";

senName="";
senAddress="";

};

Parcel::~Parcel()
{

//delete [] senAddress;
//delete [] senName;
//delete [] recName;
//delete [] recAddress;

};

int main(int argc, char * argv[]) {

int Id, weight, fee;
char senName[50],senAddress[100];
char recName[50], recAddress[100];

// create parcel calss object
Parcel parcel;

cout "Enter receipt no : "; cin >> Id;
parcel.ParcelId(Id);

cout "Enter Sender Name : "; cin.ignore(); cin.getline(senName, sizeof(senName)); parcel.senderName(senName); cout "Enter Sender Address : "; cin.ignore(-1); cin.getline(senAddress, sizeof(senAddress)); parcel.senderAddress(senAddress); cout "Enter Receiver Name : "; cin.ignore(-1); cin.getline(recName, sizeof(recName)); parcel.receiverName(recName); cout "Enter Receiver Address : "; cin.ignore(-1); cin.getline(recAddress, sizeof(recAddress)); parcel.receiverAddress(recAddress); cout "Enter weight (in grams) of a parcel : "; cin >> weight;
parcel.weight(weight);

cout "Enter Shipment Charges : "; cin >> fee;
parcel.fee(fee);

cout "\n\n Shipment Receipt"; cout "\n---------------------------"; cout "\n Receipt No. : " parcel.ParcelId(); cout "\n Sender Name : " parcel.senderName(); cout "\n Sender Address : " parcel.senderAdd(); cout "\n Receiver Name : " parcel.receiverName(); cout "\n Receiver Address : " parcel.receiverAdd(); cout "\n Parcel Weight (in grams) : " parcel.weight(); cout "\n Shipment Charges : " parcel.fee(); // Set parcel class data members system("pause");; }

#include <iostream>
using namespace std;
#include <string>


/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;

class Parcel
{

private:

// Parcel Details
int Id;
int pWeight, Fee;

// Sender 
char* senName;
char* senAddress;

// Reciver
char* recName;
char* recAddress;

// Let set/Assign values (Setter Functions)

public:

// Constructor

Parcel();

// Destructor

~Parcel();

// Set Parcel Details

void ParcelId (int ID)
{
Id = ID;
};

void weight (int wght)
{

pWeight = wght;

};
void fee (int fee)
{

Fee = fee;

};

// Set Sender Information

void senderName (char* sName)
{

senName = sName;

};

void senderAddress (char* sAddress)
{

senAddress = sAddress;

};

// Set Receiver Information

void receiverName (char* rName)
{
recName = rName;
};

void receiverAddress (char* rAddress)
{

recAddress = rAddress;

};


// Get Parcel Details 

int ParcelId()
{

return Id;
};

int weight()
{

return pWeight;

}
int fee()
{
return Fee;
};

char* senderName ()
{

return senName;

};

char* senderAdd()
{

return senAddress;
};

char* receiverName ()
{

return recName;

};

char* receiverAdd()
{

return recAddress;

}
};

// Constructor

Parcel:Tonguearcel()
{


Fee =0;
Id =0;
pWeight =0;

recName="";
recAddress ="";

senName="";
senAddress="";


};

Parcel::~Parcel()
{

//delete [] senAddress;
//delete [] senName;
//delete [] recName;
//delete [] recAddress;

};

int main(int argc, char * argv[]) {

int Id, weight, fee;
char senName[50],senAddress[100];
char recName[50], recAddress[100];

// create parcel calss object
Parcel parcel;


cout "Enter receipt no : ";
cin >> Id;
parcel.ParcelId(Id);


cout "Enter Sender Name : ";
cin.ignore();
cin.getline(senName, sizeof(senName));
parcel.senderName(senName);


cout "Enter Sender Address : ";
cin.ignore(-1);
cin.getline(senAddress, sizeof(senAddress));
parcel.senderAddress(senAddress);

cout "Enter Receiver Name : ";
cin.ignore(-1);
cin.getline(recName, sizeof(recName));
parcel.receiverName(recName);

cout "Enter Receiver Address : ";
cin.ignore(-1);
cin.getline(recAddress, sizeof(recAddress));
parcel.receiverAddress(recAddress);

cout "Enter weight (in grams) of a parcel : ";
cin >> weight;
parcel.weight(weight);

cout "Enter Shipment Charges : ";
cin >> fee;
parcel.fee(fee);

cout "\n\n Shipment Receipt";
cout "\n---------------------------";
cout "\n Receipt No. : " parcel.ParcelId();
cout "\n Sender Name : " parcel.senderName();
cout "\n Sender Address : " parcel.senderAdd();
cout "\n Receiver Name : " parcel.receiverName();
cout "\n Receiver Address : " parcel.receiverAdd();
cout "\n Parcel Weight (in grams) : " parcel.weight();
cout "\n Shipment Charges : " parcel.fee();

// Set parcel class data members






system("pause");;
}

RSS

Latest Activity

+Mr President updated their profile
17 minutes ago
A_Q added a discussion to the group ENG513 Language Teaching Methods
36 minutes ago
ALEENA replied to + M.Tariq Malik's discussion Site Overview | Assignment Solutions | Past Papers Solutions | VU Students Features
37 minutes ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Ghalti...
39 minutes ago
Profile IconALI RAZA, Husnain Kan, Safdar Mehmood and 25 more joined Virtual University of Pakistan
43 minutes ago
ALEENA liked + Iuuoɔǝut +'s discussion MTH401_Mid term Solved (Part I) with refrence
44 minutes ago
Shine--Ex-VUStudent liked + !! "AS" !!'s discussion Yaha Har Cheez ..
45 minutes ago
Shine--Ex-VUStudent liked +¢αяєℓєѕѕ gιяℓ's discussion Iss tasvir ko Unwan Dein :-P
48 minutes ago
ALEENA replied to ٥ دن's discussion Gunahon ki gehrai
49 minutes ago
ALEENA replied to + !! "AS" !!'s discussion Ghalti...
50 minutes ago
ALEENA replied to Siddiq khan kakar's discussion RIP
53 minutes ago
Muhammad Hamza Mehmood liked Faiza's profile
55 minutes ago
Profile IconKhan and zuha shah joined + M.Tariq Malik's group
55 minutes ago
Khan joined + M.Tariq Malik's group
56 minutes ago
Profile IconKhan and sardarni joined + M.Tariq Malik's group
58 minutes ago
ALEENA replied to +¢αяєℓєѕѕ gιяℓ's discussion Iss tasvir ko Unwan Dein :-P
1 hour ago
zuha shah joined + M.Tariq Malik's group
1 hour ago
zuha shah liked + M.Tariq Malik's group PSY401 Clinical Psychology
1 hour ago
zuha shah liked + M.Tariq Malik's group MGT111 Introduction to Public Administration
1 hour ago
Ali joined + M.Tariq Malik's group
1 hour ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service