Question Bank

3705 approved questions from the community

What are the three core characteristics of an object?

EASY
SINGLE CHOICE
30s
OOP
by Mohamed

What is multilevel inheritance?

MEDIUM
SINGLE CHOICE
30s
OOP
by Mohamed

What is the difference between aggregation and composition?

MEDIUM
SINGLE CHOICE
35s
OOP
by Mohamed

What is the Liskov Substitution Principle (LSP)?

HARD
SINGLE CHOICE
45s
OOP
by Mohamed

What is hybrid inheritance?

MEDIUM
SINGLE CHOICE
35s
OOP
by Mohamed

Objects have identity, state, and behavior.

EASY
TRUE FALSE
20s
OOP
by Mohamed

What does 'has-a' relationship signify in OOP?

EASY
SINGLE CHOICE
25s
OOP
by Mohamed

What is the Single Responsibility Principle (SRP) in relation to cohesion?

HARD
SINGLE CHOICE
40s
OOP
by Mohamed

What is a mixin in object-oriented programming?

MEDIUM
SINGLE CHOICE
35s
OOP
by Mohamed

A constructor can have a return type.

MEDIUM
TRUE FALSE
25s
OOP
by Mohamed

Inheritance promotes code reuse by allowing classes to acquire attributes and behaviors from parent classes.

EASY
TRUE FALSE
25s
OOP
by Mohamed

Which of the following are purposes of destructors in OOP? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
45s
OOP
by Mohamed

Which access specifier makes class members accessible within the class and its subclasses?

EASY
SINGLE CHOICE
25s
OOP
by Mohamed

Which access specifier makes class members globally accessible to all classes?

EASY
SINGLE CHOICE
25s
OOP
by Mohamed

What type of polymorphism is method overriding?

MEDIUM
SINGLE CHOICE
30s
OOP
by Mohamed

What relationship does composition establish between classes?

MEDIUM
SINGLE CHOICE
30s
OOP
by Mohamed

Which of the following are access specifiers commonly used in OOP? (Select all that apply)

MEDIUM
MULTIPLE CHOICE
40s
OOP
by Mohamed

What relationship does inheritance establish between classes?

MEDIUM
SINGLE CHOICE
30s
OOP
by Mohamed

What is the primary purpose of getters and setters in encapsulation?

MEDIUM
SINGLE CHOICE
30s
OOP
by Mohamed

Which access specifier makes class members accessible only within the defining class?

EASY
SINGLE CHOICE
25s
OOP
by Mohamed
PreviousPage 25 of 186Next