Language Mechanisms
- Use
private
to prevent access to data
members.
- Use
interfaces
to achieve representation
independence.
- Interfaces don't have data members.
- They also allow multiple implementations.
- Since interfaces don't have constructors, it is wise to
use the Factory pattern.
José M. Vidal
.
16 of 16