Analysis Classes and CRC Cards
CS 3371 - Jan. 26

Discussion Questions

  1. In the object-oriented paradigm, we talk about state/attributes on the one hand and behaviors/methods on the other. In CRC lingo, the knowledge and behaviors of a class are grouped together as its responsibilities. Why does the CRC model group them?
  2. Suppose that in analyzing a voice mail system, the analyst saw the need to keep a collection of messages and so included a linked list class in the conceptual model. Why isn't this appropriate? What would be better?
  3. In the shipping/inventory control system that Scott Ambler's CRC article discusses:
    1. Why is Order Items is listed as a responsibility of the Order class, while the Order Item class is listed as Order's collaborator?
    2. Why is Inventory Item listed both as a responsibility and a collaborator of Order Item?
  4. In a CRC model, what cards will end up at the center of the card layout? What would it mean if many cards were dueling for a spot at the center?
  5. What concept category or categories would contain these concepts?
    1. Order
    2. Manager
    3. Warehouse
    4. Layaway policy
    5. Sort
  6. What is the role of a System class in a conceptual model?

In-class exercise

Let's create a CRC model for a toy system to track projects and developers. Some high-level use cases are:

    1. Create a project entry, recording its title, leader, status, and starting date.
    2. Create a developer entry, recording name, job title, telephone number, and e-mail address.
    3. Update the status of a project.
    4. Add a team member to a project.
    5. Remove a team member from a project.
    6. Change the leader of a project.
    7. List the team members assigned to a project.
    8. List the projects to which a developer is assigned.