## 20.1 Encapsulation

- Control complexity arising from name collisions
- Hide or restrict access to members (sect. 6.3):

  >     class Product
  >     {
  >     public:
  >        Product();
  >        void read();
  >        bool is_better_than(Product b) const;
  >        void print() const;
  >     private:
  >        string name;
  >        double price;
  >        int score;
  >     };

prev |top |next