|
Answer» Four major concepts RELATED to object-oriented programmings are: - Data encapsulation: It refers to combining both data and methods into a single unit called a class. Data encapsulation helps in hiding the data from an external world.
- Data abstraction: Representation of essential features excluding their BACKGROUND details is known as data abstraction.
- Inheritance: Deriving existing class properties into a new class is called inheritance. A newly DERIVED class is called the SUBCLASS(child class) and the existing class(parent class) is called the base class. It is helpful for the re-usability of code.
- Polymorphism: Polymorphism means the ability of an object to take multiple FORMS. In java, compile-time polymorphism is achieved with the help of method overloading, and run-time polymorphism is achieved with the help of method overriding.
|