C++ Abstraction
C++ Abstraction
Data Abstraction is a feature of Object-Oriented Programming in C++. Abstraction is a process by which concepts are derived from the usage and classification of literal (“real” or “concrete”) concepts.
- Abstraction is a concept that acts as a super-categorical noun for all ordinate concepts as a group, fields, or category.
- Abstraction may be formed by reducing the information content of concepts or an observable phenomenon, typically to retain only information which is relevant to a particular purpose.
- For Example, Abstracting a leather soccer ball to the more general idea of a ball retains only the information on general ball attributes and behavior, eliminating the other characteristics of that particular ball.
Example
![](https://lh6.googleusercontent.com/KdNb0aEOEKDzko6-qyYUcn6qv119UTWjM3m2w6VyKKSYJDsj5ojzDHKfLsHkY-EwQiavUQvwcH9Pu0XnhrTy_H4QbMwrvgT8rf4xHTvU2iKluJpx9gyYEONFbqW830YTzh6iDDRH)
Output
![](https://lh6.googleusercontent.com/6p5hMx4cdfM0BDiL3mmGKsqx4CCwEr_8u-Y66k7uHKH-xd-B9wCudwQNvAfm4C-PYKaj7WaHaqLMIMgOqVJOi6zEM739XLRMMdL0yyNVTwLIrKk8gdBWu2JPXQ66BMz460gBdr-V)