You are on page 1of 3

Sample Test Paper For OOC

1. Class C is inherited from class A and class B,class D is inherited from class C.
Which of the following is true
I] class C inherits class A attributes
II] class C inherits class B attributes
III] class D inherits class B attributes only
IV] class D inherits class A attributes only

a) I, II
b) I,II,III,IV
c) II,III
d) I, IV

2. Encapsulation is a principle

a) which allows any object to derive and reuse the characteristics of another object.
b) which facilates the object to hide its implementaion and expose only the interfaces
c) which allows any object to expose only the objects attributes
d) which makes any object to behave differenlt depending upon the input object or the
calling object.

3. Which of the following is true?

a) In a procedural language, data and functions are loosely coupled where they are
tightly coupled in case of OO languages.
b) In a OO, data and functions are loosely coupled where they are tightly coupled in case
of procedural languages.
c) data and function cannot be coupled.
d) none of the above

4. State true or false


Encapsulation hides Abstraction.

a) true
b) false
c) Ignore this option
d) Ignore this option
5. Which of the following statement/s are true?
i] Encapsulation is hiding the implementation details and revealing a
consistent interface.
ii] Abstraction is hiding the implementation details and revealing a
consistent interface.
iii] Inheritance represents "is a kind of" relationship

iv] Polymorphism allows two or more objects to respond to the same message
in a different way.

a) i], iii] & iv]


b) ii], iii] & iv]
c) i] ,ii], iii] & iv]
d) iii] & iv]

6) The relationship between seed,seedling,plant & tree

a.polymorphism
b.container class
c.inheritance
d.none of the above

7. Car turning left on a road. & same car turning right on the same road.

a.overloading
b.overriding
c.inheritance
d.none

8. _____________ allows a sending object to communicate with different objects in


a consistent manner without worrying about the different implimentations available
for the message.
i) Inheritence
ii) Dynamic binding
iii) Polymorphism
iv) Encapsulation

9. Encapsulation is a principle

a) which allows any object to derive and reuse the characteristics of another object.
b) which facilates the object to hide its implementaion and expose only the interfaces
c) which allows any object to expose only the objects attributes
d) which makes any object to behave differenlt depending upon the input object or the
calling object.
10. A class that inherits from more than one superclass can also be defined. This is
called

a) multiple inheritance
b) multilevel inheritance
c) either a and b
d) none of the above

You might also like