Assignment 3
Assignment 3
Assignment 3
Islamabad.
Programming for Engineers-II
Sections-A, B, C, D
Assignment # 3
Marks=100
Semester: Spring 2011
Due Date: 12th March, 2011
Instructors: Qurat-ul-Ain/Nisar Ahmad
In this assignment you have to write a complete program in VC++ 6.0.
A class called Vehicle is required by a programmer who is writing software for a car dealer. An
object of the class Vehicle will consist of a registration number, the make of the vehicle, the year
of manufacture and the current financial value of the vehicle. The first three of these will need to
be set only at the time an object is created. The current value will also be set at the time of
creation, but may need to be changed during the vehicle's lifetime.
It will also be necessary to have a means of reading the values of all the above data items. A
method should also be provided which accepts a year as input, and returns the age of the vehicle.
Required Functions:
1) Constructor(s)
2) Get Function for every attribute of the class
3) Appropriate Set Functions.
4) Static Data Member for keeping track of the objects created.
Note: Check the number of created objects after every addition or deletion of object. Display this
number on screen after this.
Guidelines:
Subject: Assignment02_prog2
Submit ONE ZIP file named according to your roll-no (e.g. 10-0xxx.ZIP).