Classes and Objects
- slide 10 : 29
Representation Independence
Representation independence
: Clients of the class C should not be affected by changes of C's data representation
A Point class with public instance variables - NOT Recommended .
A Client of Point.
A version of class Point modified to use polar coordinates - NOT Recommended.
Public data representation
Encapsulated data should always be
hidden
and
private
within the class