wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

object oriented programming

Total questions: 35

Worksheet time: 19mins

Name
Class
Date
1.
Which of the following concepts of OOPS means exposing only necessary information to client?
a)
Encapsulation
b)
Abstraction
c)
Data hiding
d)
Data binding
2.
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
3.
These have identitystate, and behavior.
a)
class
b)
object
c)
method
d)
void
4.
As a blueprint is a design for a house, a class is a design for a(n):
a)
object
b)
variable
c)
constant
d)
statement
5.
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.
6.
The wrapping up of data and functions into a single unit is called
a)
overloading
b)
class
c)
object
d)
encapsulation 
7.
The process by which objects of one class acquire the properties of objects of another class is known as
a)
Polymorphism
b)
Inheritance
c)
Data Hiding
d)
None of the above.
8.

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

a)

Object

b)

Singular Object

c)

Instance

d)

Singular

9.

Car, Fruit, Ball & Pet are all examples of potential classes?

a)

True

b)

False

10.

A dog might be an instance of the Pet class?

a)

True

b)

False

11.

How many lines will this code print?

x = 10

while x > 0:

print(x)

x = x - 3

a)

5

b)

2

c)

3

d)

4

12.

Real-world objects contain ___ and ___.

a)

state

b)

behavior

c)

attributes

d)

methods

13.

A software object's state is stored in ___.

a)

encapsulation

b)

inheritance

c)

polymorphism

d)

fields

14.

A software object's behavior is exposed through ___.

a)

methods

b)

encapsulation

c)

abstraction

d)

inheritance

15.

Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data ___.

a)

inheritance

b)

polymorphism

c)

abstraction

d)

encapsulation

16.

A blueprint for a software object is called a ___.

a)

object

b)

program

c)

API

d)

class

17.

What are the pillars of OOP?

a)

Inheritance

b)

Transparency

c)

Abstraction

d)

Accountability

18.

Refers to the bundling of data, along with the methods that operate on that data, into a single unit.

a)

Inheritance

b)

Polymorphism

c)

Abstraction

d)

Encapsulation

19.

Ability for a data or message to be processed in more than one form.

a)

Abstraction

b)

Encapsulation

c)

Polymorphism

d)

Inheritance

20.

Known as hiding of data

a)

Logical Schema

b)

Data Abstraction

c)

Data Independence

d)

Data Types

21.

A hierarchy of classes that share a set of attributes and methods.

a)

Abstraction

b)

Inheritance

c)

Encapsulation

d)

Polymorphism

22.

Type of programming that is based on objects rather than just functions and procedures.

a)

Structural Programming

b)

Logic Programming

c)

Functional Programming

d)

Object Oriented Programming

23.

It is the way of thinking about software construction by creating pure functions.

a)

Logic Programming

b)

Functional Programming

c)

Object Oriented Programming

d)

Structural Programming

24.

What are/is the reasons why we use object-oriented programming?

a)

Scalability

b)

Lower cost of development

c)

Security and Reliability

d)

All of the Above

25.

It refers to the method of programming which consists of a completely structured control flow.

a)

Logic programming

b)

Functional Programming

c)

Object Oriented Programming

d)

Structural Programming

26.

Is it true that the polymorphism offers a lot of flexibility in OOPs?

a)

Yes

b)

No

27.

Characteristics of OOP..

a)

Abstraction

b)

Encapsulation

c)

Inheritance

d)

Polymorphism

e)

seriously.. i am not sure with my answer :(

28.

A ________ is blue print that defines certain characteristics and behavior. It is simply a representation of different types of objects.

a)

Class

b)

Object

c)

Attribute

d)

Characteristics

29.

An _________ is an instance or of a copy of a class.

a)

Class

b)

Object

c)

Attribute

30.

__________ is the process of using a function for more than one purpose. It allows the use of different internal structures of the object by keeping the same external interface.

a)

Inheritance

b)

Polymorphism

c)

Abstraction

d)

Encapsulation

31.

The extends keyword is used. This is the process of getting properties from one class to another - one way of organizing classes.

a)

Class

b)

Inheritance

c)

Interface

d)

Package

32.

It has characteristics or attributes. The values of an object's attributes give the object a state.

a)

Object

b)

Class

c)

Inheritance

d)

Interface

33.

The process by which objects of one class acquire the properties of objects of another class is known as

a)

Polymorphism

b)

Inheritance

c)

Data Hiding

d)

Association

34.

Which from the following is a feature that allows us to perform a single action in different ways.

a)

Abstraction

b)

Polymorphism

c)

Encapsulation

d)

Inheritance

35.

What is the alternative for x = x + 5?

a)

x += 5;

b)

x -= 4;

c)

x = y + 5;

d)

x=+5