What is an abstraction in object-oriented programming?
Options
- A. Hiding the important data
- B. Hiding the implementation
- C. Hiding the implementation and showing only the features
- D. Showing the important data
C. Hiding the implementation and showing only the features
Abstraction in Object-Oriented Programming means:
Showing only the essential features of an object and hiding the internal implementation details.
For example, when you drive a car:
You use the steering wheel, brake, and accelerator (features).
You don’t need to know how the engine works internally (implementation hidden).
In C++ and Java, abstraction is achieved using:
Abstract classes
Interfaces
Attempt Quiz Now:
BPSC Tre 4.0 OOPS Concepts Practice Set