The correct answer is C. abstraction.
Abstraction is the process of hiding the unnecessary details and showing only the essential information to the user. It is a way of representing complex objects in a simple and easy-to-understand way.
In object-oriented programming, abstraction is achieved by using classes. A class is a blueprint for creating objects. It defines the properties and methods that all objects of that class will have.
When you create an object, you are creating an instance of a class. The object will have
all of the properties and methods that are defined in the class.Abstraction is important because it allows you to focus on the essential details of an object without having to worry about the implementation details. This makes it easier to understand and use objects.
Here is a brief explanation of each option:
- Polymorphism: Polymorphism is the ability of an object to take on multiple forms. It is achieved by using inheritance and overriding methods.
- Inheritance: Inheritance is the ability of a class to inherit the properties and methods of another class. This allows you to create new classes that are based on existing classes.
- Data hiding: Data hiding is the process of keeping the internal details of an object private. This is done by declaring the properties and methods of an object as private.
I hope this helps!