Next: Interfaces
Up: Extending Classes
Previous: Extending classes: how and
Contents
Subsections
- Choose the access for each part of a class design carefully: public, protected, private.
- If your design will have subclasses, design your protected parts carefully.
- Fields can be modified at any time by a programmer.
- No way to add functionality.
- Public interface for programmers using the class.
- Protected interface for programmers extending the class.
Next: Interfaces
Up: Extending Classes
Previous: Extending classes: how and
Contents