Object-Oriented Programming [Java] Exam
Questions With Correct Answers.
Three Fundamental Features of OOP - Answer✔Encapsulation
Inheritance
Polymorphism
Encapsulation - Answer✔An object-oriented technique in which the internal details of an object
are "hidden" in order to simplify their use and reuse.
Inheritance - Answer✔A relationship between two classes in which one class ( the subclass)
inherits all of the properties and capabilities of another ( the superclass)
Polymorphism - Answer✔Declaring a variable to have one type while it refers to an object of a
subclass of that type.
Object-Oriented Analysis - Answer✔A means of determining what aspects of a given problem
can be viewed as objects in an eventual object-oriented design.
Object-Oriented Design - Answer✔A software design method that models the characteristics of
abstract or real objects using classes and objects.
Object-Oriented Programming - Answer✔A programming technique that features objects,
classes, encapsulation, interfaces, polymorphism, and inheritance.
Cohesion - Answer✔Degree to which responsibilities of a given component are a meaningful
unit
Cohesion vs Coupling - Answer✔Greater cohesion reflects better design. Less coupling reflects
better design.
Coupling - Answer✔Degree to which one component must directly access the data of another
component.
Roles - Answer✔Sets of Responsibilities
Roles vs. Objects - Answer✔They are the same when a given role is always played by the same
object type.
1|Page