Encapsulation : class car
class car {
public: //interface
// behavior or functions
Start_Engine;
Accelerate;
Brake;
Park;
Shift_gear;
// attributes or parts
Color;
Seat_belt;
private: //under the hood
Display_speed;
Odometer;
Engine;};
Previous slide
Next slide
Back to first slide
View graphic version