Professional Documents
Culture Documents
EXAM
EXAM
ENUMERATION
4-7. What are the four types of association between the objects
II.Multiple Choice
A. Encapsulation
B. Coupling
C. Polymorphism
3. Is a mechanism in which one object acquires all the properties and behaviors of a parent object.
A. Composition
B. Inheritance in Java
C. Reusability
A. single inheritance
B. Multilevel Inheritance
C. Hierarchical Inheritance
A. single inheritance
B. Multilevel Inheritance
C. Hierarchical Inheritance
III.TRUE OR FALSE
1. The super keyword in Java is a reference variable which is used to refer immediate parent
class object.
2. If subclass (child class) has the same method as declared in the parent class, it is known as
Aggregation in Java.
3. The relationship between the two classes is Programmer IS-A Employee.
4. Method overriding is used to provide the specific implementation of a method which is
already provided by its superclass.
5. The Java final variable in java is used to restrict the user.
6. If you make any method as final, you cannot override it.
7. The super keyword can also be used to invoke the parent class constructor.
8. There can be three types of inheritance in java: single, multilevel and hierarchical.
9. Aggregation represents the relationship where one object contains other objects as a part of
its state.
10. Any entity that has state and behavior is known as an object. For example, a chair, pen,
table, keyboard, bike, etc.