خرید بک لینک

Vote count: 0

I'm reading Grady Booch's book third edition. In page 94, Booch said that:

We can furthur devide the interface of a class into four parts:

  1. Public: a declaration that is accessible to all clients
  2. Protected: a declaration that is accessible only to the class itself and its subclasses
  3. Private: a declaration that is accessible only to the class itself
  4. Package: a declaration that is accessible only by classes in the same package

I can understand why protected declaration can be considered a interface, becuase subclasses of a class is this class's client, too.

But I don't understand why the private declaration can be considered as interface. Please enlight me.

asked 28 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 5 مرداد 1395 ساعت: 12:39

صفحه بندی