Professional Documents
Culture Documents
Abstraction REPORT
Abstraction REPORT
Abstraction
Function of Abstraction is the concept of object-
oriented programming that “shows” only essential
attributes and “hides” unnecessary information. The
main function of abstraction is hiding the unnecessary
details from the users. Abstraction is selecting data from
a larger pool to show only relevant details of the object
to the user. It helps in reducing programming
complexity and efforts. It is one of the most important
concepts of OOPs.
Abstraction
The keyword abstract can be applied to classes and
methods.
Abstraction
• The main benefit of using an Abstraction in
Programming is that it allows you to group several
related classes as siblings.
• Helps to increase the security of an application or
program as only important details are provided to the
user.
• Avoids code duplication and increases reusability.
• It reduces the complexity of viewing the things.
Benefits of Abstraction
Consider a real life example of a man driving a
car. The man only knows that pressing the
accelerators will increase the speed of car or
applying brakes will stop the car but he does not
know about how on pressing accelerator the speed
is actually increasing, he does not know about the
inner mechanism of the car or the implementation
of accelerator, brakes etc. in the car. This is what
abstraction is.
Example of Abstraction
Output: