- Type
- Midterm past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 61 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 5. Download the file for all 5 pages.
Cs304
Which of the statements is true about destructor?
Destructors return types are always void
Destructors are called in reverse order of constructor called in a class hierarchy
Destructors are used to display the data members of their respective class
Identify the type of variable that is part of a class, yet is not part of an object of that class.
instance
static
global
local
Which of the following operators can not be overloaded?
Target function for a call is selected at compile time in case of
Static binding
Polymorphism
Encapsulation
Dynamic binding
Suppose it is required to implement a single functionality with different data type, which of the following techniques should be used
Identify and correct the error(s) in the given code segment.
template< typename T > class Parent {
template< > class Child< int > : public Parent {
int main() { Parent< char > obj; Child< int > obj2; return 0; Given are two classes A and B. class B is inherited from class A. Write a code snippet(for main function) that polymorphically call the method of class B. Also what changes do you suggest in the given code segment that are required to call the class B method polymorphically.
class A
public: void method() { cout<<"A's method \n"; }
class B : public A
public: void method() { cout<<"B's method\n"; }
Implement the given class hierarchy where there exist a relation ship of inheritance between Employee and Contract (for contract employee). The Display() function of Contract should display the data that includes ; Name, Num_hours, Per_hour_sal, Salary
Monthly salary of contract employee is calculated as
Related CS304 files
All CS304 files →- CS304 Midterm Past Paper 1 Midterm PDF 66 KB
- CS304 Midterm Past Paper 5 Midterm PDF 64 KB
- CS304 Midterm Short Notes by Syed Abdul Ahad Midterm DOCX 44 KB
- CS304 Midterm Past Paper 4 Midterm PDF 23 KB
- CS304 Highlighted Handouts by 404 Highlighted PDF 3.8 MB
- CS304 Assignment 1 Solution Fall 2021 Assignment PDF 102 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.