Abstraction or Data hiding refers to the act of representing essential features without including the background details or explanation.
Example: While driving a car, we only know the essential features of the car like gear handling, steering handling, use of clutch, accelerator, and brakes etc. but we do not get into internal details like wiring, engine/motor works etc.
Class car { public: /*Public interfaces*/ int get_gear_count(void); int turn_left(void); int turn_right(void); int go_straight(void); int set_speed(int kmh); int get_speed(int kmh); int do_break(void); private: /*Private hidden members*/ int steering_direction; int engine_speed; int break_value; int current_gear; };
About our authors: Team EQA
You have viewed 1 page out of 62. Your C++ learning is 0.00% complete. Login to check your learning progress.
Most popular
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average