Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

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

Assignment No. 01
Semester: Spring 2016
Object Oriented Programming – CS304
Total Marks: 20

Due Date: May 19, 2016

To get a hands on experience in creating and using a class according to requirements.
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:

 The assignment is submitted after due date.
 The assignment is submitted via email.
 The assignment is copied from Internet or from any other student.
 The submitted assignment does not open or file is corrupt.
 It is in some format other than .cpp (Code File).

Note: All types of plagiarism are strictly prohibited.

For any query about the assignment, contact at

Case Study
With the technological innovation, the world has become a global village which enables us to contact people living far away from us. Distances have shrunk and people use many courier services on daily basis to send and receive gifts/letters/parcels. One of the popular courier services in Pakistan is XYZ which delivers your parcels nationally and internationally. Every parcel that is mailed by XYZ has some cost and weight associated with it. XYZ want to get an application which will keep records of shipment in computer.

Suppose you are working as a software developer in a software house and you got a task to develop a small application for courier company XYZ which should fulfill requirements given in problem statement.

Problem Statement:
Develop a small application in C++ that should allow the user of application to enter the receipt number, sender name, sender address, receiver name, receiver address, shipment fee and parcel weight. After getting required information, generate a shipment receipt and show as summary on screen.
To develop the application you need to create class with data member and member function as given below:

1. Class Parcel:
Attributes or Data Members:
Getter and setter functions of all data members
Constructor and Destructor
Hint: Put all data members in private part of class and getter/setters in public part of class. Create an object of Parcel class in main function, get all required information in local variables and save the information in data members of class with the help of setter functions. After saving all required information, retrieve the information with the help of object of Parcel class using getter functions.
Note: Assignment no.1 and 2 will be chained. So in first assignment you need to make application according to requirements given above. Solution of this assignment will be used in second assignment, so we recommend you to solve assignment yourself.
Sample Output:


Views: 2502


Replies to This Discussion

any discussion??

The file which is presently uploaded as solution couldnot run properly,

It is not showing shipment receipt (data entered as input)......

AOA anybody help me about assignment cs304

cs 304 ki assignment cpp main banani hy

kisi ne assignment bani hai k nahi

using namespace std;
class Parcel{
int ID;
string senderName;
string senderAddress;
string receiverName;
string receiverAddress;
int weight;
int fee;


void setId(int);
void setsenderName(string);
void setsenderAddress(string);
void setreceiverName(string);
void setreceiverAddress(string);
void setweight(int );
void setfee(int );

int getId();
string getsenderName();
string getsenderAddress();
string getreceiverName();
string getreceiverAddress();
int getweight();
int getfee();
void display();



Parcel(int id1,string sendername1,string senderaddress,string receivername,string receiveraddress,int weight,int fee){
senderName= sendername1;




void Parcel::setId(int id1){
void Parcel::setsenderName(string sendname1){
void Parcel::setsenderAddress(string senderaddress1){
void Parcel::setreceiverName(string receivername1){

void Parcel::setreceiverAddress(string receiveraddress1){
void Parcel::setweight(int weight1){

void Parcel::setfee(int fee1){

int Parcel::getId(){
return ID;
string Parcel::getsenderName(){
return senderName;

string Parcel::getsenderAddress(){

return senderAddress;
string Parcel::getreceiverName(){
return receiverName;
string Parcel::getreceiverAddress(){

return receiverAddress;

int Parcel::getweight(){

return weight;
int Parcel::getfee(){

return fee;

void Parcel::display(){
cout"The Receipt No:"<"the="" sender="" name:"sendernameendl;="" address:"senderaddressendl;="" reciver="" name:"receivernameendl;="" address"receiveraddressendl;="" the="" weight(g):"weightendl;="" shipment="" charges:"feeendl"\n\n\n";="" }="" main(){="" cout"\t\t\t--------------------------------------------="">>>>>>>>>>>>"<"\t\t\t---------------------------------------------=""">>>>>>>>>>>>"<"enter="" receipt="" no:";="" cin=""">>A;
cout"Enter Sender Name:"; cin>>B;
cout"Enter Sender Address:"; cin>>C;
cout"Enter Reciver Name:"; cin>>D;
cout"Enter the Reciver Address:"; cin>>E;
cout"Enter the Weight (g):"; cin>>w;
cout"Enter the Shipment Charges:"; cin>>f;

Parcel Card(A,B,C,D,E,w,f);
cout"\n\n\n\n\n\n"; cout"---------------------------------------------->>""\n"; cout"\t\tShipment Receipt"<"----------------------------------------------=""">>""\n\n\n";


Looking For Something? Search Below

Latest Activity

VIP Member Badge & Others

How to Get This Badge at Your Profile DP


Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

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

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