What is Abstraction:In Oops, Abstraction is one of main principle in 4 principles (Abstraction, Encapsulation, Inheritance, Polymorphism). Abstraction is the “process of representing only essential features”. That means Abstraction doesn’t show the complexity behind features. Abstraction is used for “Making things more general, simpler, abstract”.
Real Time Example for Abstraction:` The Best real time example for abstraction is ATM (Automated Teller Machine). We doesnt know how ATM internally works when we are using ATM, we know only select options like withdraw, Balance Inquiry, Mini Statement etc.
Here abstraction hides all unnecessary things, it shows only necessary things.
Advantages of Abstraction:- Abstraction makes code as readable and more simpler. Because complexity of code will be hidden.
- Abstraction makes code from longer to small , because abstraction doesn't show unnecessary things.
- Without Abstraction maintaining code is very complex in Java and .Net. Abstraction gives one structure to program code.
Disadvantage of Abstraction:- A disadvantage is that abstract classes cannot be instantiated, but most of the time it is logical not to create a object of an abstract class
Conclusion: Here freshers junction explains all about Abstraction, That is What is Abstraction? For this simple definition without confusion, Real time example for Abstraction?
Follow us On Facebook group (44k+ members) to discuss more about these topics, join here
Press Ctrl+D to bookmark this page, then it is easy to review this question
You may also search in Google as:
What is abstraction, abstraction concept in Oops, Real time example for Abstraction, Advantages of abstraction, disadvantages of abstraction, abstraction advantages disadvantages, abstraction real time example, general example for Abstraction, definition of abstraction, whole concept of Abstraction in .net, Java and Oops. Natural example of abstraction.