Abstraction in C++
Data abstraction is a process of representing the essential features without including implementation details. Here we discuss about abstraction in C++
Data abstraction is the process of representing essential details not including internal details. Example index of the book
Data abstraction refers to, providing only essential features by hiding its background details.
Example:
class result
{
int marks;
float percentage;
char name[20];
void input();
void output();
}
main()
{
bank b1;
b1.input();
b1.output();
}
In the above example, b1 is an object calling input and output member functions, but that code is invisible to the object b1.
Abstract Class
Abstract Class is a class which contains at least one Pure Virtual function in it.
No comments :
Post a Comment