Sie sind auf Seite 1von 2

Assignment No.

01
Semester: Spring 2016
Object Oriented Programming CS304

Total Marks: 20
Due Date: May 19, 2016

Objectives:
To get a hands on experience in creating and using a class according to
requirements.
Instructions:
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 CS304@vu.edu.pk

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:
Id:int
senderName:string

senderAddress:string
receiverName:string
receiverAddress:string
weight:int
fee:int
Methods/Operations/Getters/Setters:
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:

BEST OF LUCK

Das könnte Ihnen auch gefallen