A subclass may also override methods from the superclass. The way internal data is accessed and represented is hidden from the outside world because it is not necessary. The concept of encapsulation means that changes may be made to the implementation of a portion of an application with minimal impact on the entire system. For example, in a drawing program, a draw message sent to an object designed to draw circles would draw a circle on the screen. The same draw message sent to an object designed to draw a square would draw a square on the screen.
Objects have properties or attributes .
For example a sweater has color, sleeves, buttons and size. The values of these properties define the state or provide data about the object . Actions may be performed on the objects. For example, the sweater may be dry-cleaned, the color may be changed, it may be worn. Methods describe activities the objects might perform.