Abstraction is one of the principle of object oriented programming . It is the concept of display only the necessary and essential features of an object .You can find the concept of Abstraction in your real world in many instances .
Example for Real world Example : The simple and well known example is steering of the car . if you turn the steering to right the wheels will be moved to right .hence As a driver you will be instructed to use the steering as the essential feature to drive instead of explaining the internal mechanism how the wheels worked .
How to Implement in Your Real time Project?
For the Beginners , it is important to implement oops concept in your code as it indicates the quality of your code . You can implement abstraction in many ways . The best and simple way is using property procedures
Code
- public class Employee
- {
- private int pSal;
- public int sal
- {
- get
- {
- return pSal;
- }
- set
- {
- pSal = value;
- }
- }
- }

Santhakumar MunuswamyPosted Apr 13, 2015, 1:44 PM
Good.