This collection of notes on OOP was never meant to stand alone. It also represents a view of OO circa early to mid 1990s. Some people still find them useful, so here they are, caveat emptor. Special thanks to Gilbert Benabou for taking to time to compile the first printable version of this document and inspiring us to provide it.
[ PDF ] Printable Version
Table of Contents
- Motivation for OO
- The OO Paradigm
- Visualizing Program Execution
- OO Naming Conventions
- The Object Model
- Abstraction and Identity
- Object-Oriented Messaging
- Encapsulation & Modularity
- Object-Oriented Hierarchy
- Object-Oriented Typing
- OO Concurrency & Persistence
- The OO Development Process
- OO Analysis Techniques
- Pitfalls in OO Analysis
- UML Notation
- CRC Cards
- OO Class Relationships
- Object Oriented Aggregation
- Object Oriented Interitance
- Other Object Oriented Class Relationships
- Object Oriented Instantiation
- Object Oriented Polymorphism
- Review of OO Programming
- The Quality of Classes and OO Design
Class / Responsibilities / Collaborators
CRC cards are a simple representation of the classes in an OO system. They are often a good way to get started when facing a new project. Physically the cards are 3x5 or 4x6 index cards.
You write the name of the class at the top of the card. On the left half of the card you write the responsibilities (which cover the class attributes via "knowing...") and on the rights side you write the collaborations (other classes) for this class.
Scenarios, use-cases, role playing, etc, can then be used to find new behavior, and make sure it is listed as a responsibility on some card.
The advantages of using low tech cards are:
- simple, cheap, editable
- spatial groupings for exploration of relationships: class hierarchy, object messaging
- very practical, good at playing "what if" games with class definitions.
- encourages seeing the separation and boundaries of abstractions.
- easy to role play with.