- Type
- Midterm past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 69 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 6. Download the file for all 6 pages.
MIDTERM EXAMINATION
CS304- Object Oriented Programming (Session - 2)
Q1. Which part of an object exhibits its state? (1 marks)
Q2. Inheritance is a way to (1 marks)
Q3. Suppose you have been given the following design, (1 marks)
"A person has a name, age, address and -----. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive". Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?
Q4. What problem(s) may occur when we copy objects without using deep copy constructor? (1 marks)
Q5. this pointers are not accessible for static member functions. (1 marks)
Q6. A static member function cannot be declared. (1 marks)
Q7. _______ remain in memory even when all objects of a class have been destroyed. (1 marks)
Q8. Friend functions are _____________ functions of a class. (1 marks)
Q9. ___________, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A. (1 marks)
Q10. The statement objA=objB; will cause a compiler error if the objects are of different classes. (1 marks)
Q11. Identify which of the following overloaded operator function’s declaration is appropriate for the given call? (1 marks)
Rational_number_1 + 2.325 Where Rational_number_1 is an object of user defined class Rational_number.
Related CS304 files
All CS304 files →- CS304 Midterm Solved Paper 2 Midterm PDF 215 KB
- CS304 Midterm Solved Subjective with References by Moaaz Midterm PDF 297 KB
- CS304 Midterm MCQs Set 2 by VU Topper RM Midterm PDF 537 KB
- CS304 Midterm Solved Subjective with References by Moaaz and Irfan Midterm PDF 297 KB
- CS304 Highlighted Handouts by Mickey Ch Highlighted PDF 3.6 MB
- CS304 Solved Quiz 1 Quiz PDF 568 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.