Professional Documents
Culture Documents
G7 Third Term Reviewer
G7 Third Term Reviewer
GETTER/SETTER
1. Reusing an existing class in a new class to be able to perform an action in different
ways.
2. A concept that is used to form another concept.
3. An attribute is set to this access modifier for it to be hidden.
4. A method is used to change the value of a private attribute.
5. A method is used to access the value of a private attribute.
Study the given sample codes and Identify if it’s Encapsulation, Inheritance or
Polymorphism.
6.
7.
8.
9.
10.
11.
12.
13.
● What action do both of the classes named "Animal" and "Human" can do based on the
code?
● What are the actions the class named "Human" can do based on the code? Type the
sentences that will be printed out if these actions are called.
● What type of inheritance is used in this example?
● What are the super classes in this example?
● What are the subclasses in this example?
● how the access modifiers work in JAVA by comparing it in a real-life situation.
● Why is polymorphism used in JAVA OOP?