What is encapsulation?
- The practice of hiding internal details of a class and exposing only necessary
functionality through access modifiers and properties.
private int speed;
public int Speed
get { return speed; }
set { speed = value; }
functionality through access modifiers and properties.
private int speed;
public int Speed
get { return speed; }
set { speed = value; }