Data abstraction:
Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost and functions to operate on these attribute. They encapsulate all the essential properties of the object that to be created.
- The separation of the logical properties of data from the details of how the data are represented.
- The most effective weapon that computing scientists have in their fight against complexity is abstraction.
- Concentrating on the essentials and ignoring the details.
- Sometimes abstraction is described as "remembering the 'what' and ignoring the 'how'".
Example
Class A
{
int a;
public:
void display ();
};
|