What is abstraction?

What is abstraction?

The process of hiding unnecessary data and exposing essential features is called abstraction. Abstraction is separating the logical properties from implementation details.

What is an abstraction and why is it important?

- Abstraction is to specify what to do (the necessary details) but not how to do (all details). For example, monitor information like size, screen type, power switches are specified for abstraction. But the inner parts and the functionality need not be known. In other words, making the details available for the user does matters.
- For example, Employee class has a method calculateSalary() which receives the ‘empid’ as parameter and returns the salary of the employee concerned. The user who invokes the calculateSalary() method does not concerned about how the salary calculated. So, abstraction specifies to expose only the details which are concerned with the user.
- Abstraction is important because, the code reusability is one of the benefits to the user. There is flexibility to implement the business logic for various objects which accesses the method. In the above example, salaries of employees of various cadres can use the neither same method with minor nor changes.

What is abstraction?

It is the process of hiding unwanted details from the user.
C++-what-is-overriding.aspx
Overriding - Defining a function in the derived class with same name as in the parent class.
What is copy constructor? - C++
Copy constructor - A copy constructor is a special type of constructor that is used to create an object...
Define private, protected and public access control - C++
Define private, protected and public access control - Private is the default access specifier for every declared data item in a class.....
Post your comment