Object Oriented Programming
Object Oriented Programming
PK
www.vustuff.com
MIDTERM EXAMINATION
SPRING 2006 Marks:
CS304 – object oriented programming (Session - 1 ) Time: 120min
StudentID/LoginID: ______________________________
Exam Date:
a. There is no choice.
3. Do not ask any questions about the contents of this examination from
anyone.
a. If you think that there is something wrong with any of the questions,
attempt it to the best of your understanding.
a. If you believe that two (or more) of the choices are the correct ones for
a particular question, choose the best one.
b. On the other hand, if you believe that all of the choices provided for a
particular question are the wrong ones, select the one that appears to
you as being the least wrong.
**WARNING: Please note that Virtual University takes serious note of unfair
means. Anyone found involved in cheating will get an `F` grade in this
course.
For Teacher's use only
Question 1 2 3 4 5 6 7 8 9 10 Total
Marks
• compilation
• linking
• execution
• loading
• free(a,5);
• delete(a,5);
• delete a;
• delete [] a;
Class Cat
{
int GetAge() const;
private:
int itsAge;
};
i. empName
ii. empDesignation
iii. empSalary
a) Create the object of this class using parameterized constructor in order to initialize
all the three data members i.e. empName, empDesignation and empSalary
b) Write a member function of this class named increment (), this function will
calculate the incremented salary of the employee. In increment function user will
enter the increment amount in the current salary of the employee and displays the
incremented salary after the addition of increment.
c) write the getter and setter functions for the data members of this class
A system call
► CPU
► Compiler
► Hard disk