wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Design Pattern - 1

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

Db, Encrypter and Person was the example of:

a)

Composition

b)

Association

c)

Aggregation

d)

Dependency

2.

Association is:

a)

One object depends on other

b)

First object uses second and second uses first

c)

Both 2 and 3

d)

None of above

3.

Brain and Body was example of:

a)

Composition

b)

Association

c)

Aggregation

d)

Inheritance

4.

Car and Engine is the example of :

a)

Composition

b)

Association

c)

Aggregation

d)

Inheritance

5.

Doctor and a patient is an example of:

a)

Composition

b)

Association

c)

Inheritance

d)

Aggregation

6.

Inheritance commonly known as

a)

"is a" relationship

b)

"has a" relationship

c)

"dependency" relationship

d)

None of above

7.

Association is:

a)

One to Many relationship

b)

Many to one relationship

c)

Many to many relationship

d)

None of above

8.

Types of inheritance are:

a)

Public

b)

Private

c)

Protected

d)

All of above

9.

Aggregation is commonly known as:

a)

"is a" relationship

b)

"has a" relationship

c)

"dependency" relationship

d)

None of above

10.

Which of the following is only in C++

a)

mutable

b)

friend

c)

encapsulation

d)

constant