A class plays two roles in an OO program:
- It provides a container for behavior that's shared by many objects.
- It acts as an object factory, manufacturing new instances and ensuring they are initialized correctly.
A class plays two roles in an OO program: