Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Object Oriented Programming Evaluation 4

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What is the difference between a class and an object?
a)
A class is a blueprint to make an object
b)
An object is a blueprint to make a class
c)
A blueprint is an object to make a class
d)
Blueprint class is an object make a
2.
These have identity, state, and behavior.
a)
class
b)
object
c)
method
d)
void
3.
Which of the following statements is incorrect?
a)
Class is an object factory
b)
Class is a composite type.
c)
Class is an instance of an object.
d)
Class is a user defined type.
4.

A single object can also be referred to as an...

a)

Object

b)

Singular Object

c)

Instance

d)

Singular

5.

Which of the these is the functionality of ‘Encapsulation’?

a)

Binds together code and data

b)

Using single interface for general class of actions

c)

Reduce Complexity

d)

All of the mentioned

6.
___________ are special methods that can be used to create and initialize an object
a)
 Constructors
b)
classes
c)
Interfaces
d)
Objects
7.
Constructors are called just once when ______.
a)
an object is being created
b)
a class is being terminated
c)
class is being closed
d)
an object is being destroyed
8.

What does an object consist of?

a)

Methods

b)

Attributes

c)

Methods and Attributes

d)

Procedures

e)

Variables

9.

A protected member of the class in accessible in

a)

Only same class

b)

Same class and derived class

c)

Outside the class

10.

What is the syntax of inheritance of class?

a)

class name

b)

class name : access specifer

c)

class name : access specifer class name

11.

What are mandatory parts in function declaration?

a)

return type,function name

b)

return type,function name,parameters

c)

both a and b

12.

Destructor are automatically called by the compiler when the object goes out of scope.

a)

True

b)

False

13.

Which of the following provides a reusable mechanism?

a)

Abstraction

b)

Dynamic binding

c)

Inheritance

d)

Encapsulation

14.

Which feature allows you to create a Derived class that inherits properties from more than one Base class?

a)

Multilevel Inheritance

b)

Multiple Inheritance

c)

Hierarchical Inheritance

d)

Hybrid Inheritance

15.
Which of the following concepts of OOPS means exposing only necessary information to client?
a)
Encapsulation
b)
Abstraction
c)
Data hiding
d)
Data binding