Module 2: Introduction to Object Oriented Programming (cont.) Flashcards
_____ can be defined as the process where one class acquires the properties (methods and
fields) of another. With the use of _____ the information is made manageable in a hierarchical
order.
Inheritance
The class which inherits the properties of other is known as _____ (derived class, child class).
subclass
The class whose properties are inherited is known as _____ (base class, parent class).
superclass
To inherit from a class, use the _____ keyword.
extends
If you don’t want other classes to inherit from a class, use the _____ keyword.
final
_____ is the ability of an object to take on many forms.
Polymorphism. The most common use of
polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.
The meaning of _____, is to make sure that “sensitive” data is hidden from users.
Encapsulation.
To achieve this, you must:
* declare class variables/attributes as private
* provide public get and set methods to access and update the value of a private variable
The _____ method returns the variable value, and the _____ method sets the value.
get and set
_____ is the process of hiding certain details and showing only essential information to the user.
Abstraction
_____ is a restricted class that cannot be used to create objects (to access it, it must be inherited from
another class).
Abstract class
_____ can only be used in an abstract class, and it does not have a body. The body is provided by
the subclass (inherited from)
Abstract method