Skip to content

Instantly share code, notes, and snippets.

@xpepper
Created May 17, 2013 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xpepper/5598665 to your computer and use it in GitHub Desktop.
Save xpepper/5598665 to your computer and use it in GitHub Desktop.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment