Page 290 -
P. 290

chaPter 10  •  object-oriented systems analysis and design Using Uml     257

                     As the group decides which class is responsible for a particular function, the analyst who
                 owns the class for the session picks up that card and declares, “I need to fulfill my responsibil-
                 ity.” When a card is held in the air, it is considered an object and can do things. The group then
                 proceeds to refine the responsibility into smaller and smaller tasks, if possible. These tasks can
                 be fulfilled by the object if it is appropriate, or the group can decide that it can be fulfilled by
                 interacting with other things. If there are no other appropriate classes in existence, the group may
                 need to create one.
                     The four CRC cards depicted in Figure 10.3 show four classes for course offerings. Notice
                 that in a class called Course, the systems analyst is referred to four collaborators: the depart-
                 ment, the textbook, the course assignment, and the course exam. These collaborators are then
                 described as classes of their own on the other CRC cards.
                     The responsibilities listed will eventually evolve into what are called methods in UML.
                 The Object Think statements seem elementary, but they are conversational so as to encourage a
                 group of analysts during a CRC session to describe as many of these statements as possible. As




                                                                                                Figure 10.3
                                                                                                Four CRC cards for course
                           Class Name: Department
                           Superclasses:                                                        offerings show how analysts
                           Subclasses:                                                          fill in the details for classes,
                           Responsibilities    Collaborators  Object Think    Property          responsibilities, and collaborators,
                           Add a new department  Course     I know my name    Department Name   as well as for Object Think
                           Provide department information   I know my department chair   Chair Name  statements and property names.




                           Class Name: Course
                           Superclasses:
                          Subclasses:
                          Responsibilities
                                               Collaborators
                          Add a new course                 Object Think       Property
                                               Department
                          Change course information        I know my course number  Course Number
                                               Textbook
                          Display course information       I know my description  Course Description
                                               Assignment
                                                           I know my number of credits
                                               Exam                           Credits
                         Class Name: Textbook
                         Superclasses:
                         Subclasses:                                        Property
                         Responsibilities    Collaborators  Object Think    ISBN
                         Add a new textbook  Course       I know my ISBN    Author
                         Change textbook information      I know my author   Title
                         Find textbook information        I know my title    Edition
                         Remove obsolete textbooks        I know my edition
                                                          I know my publisher  Publisher
                                                          I know if I am required  Required

                          Class Name: Assignment
                          Superclasses:
                         Subclasses:
                         Responsibilities
                                              Collaborators
                         Add a new assignment             Object Think       Property
                                              Course
                         Change an assignment             I know my assignment number
                                                                             Task Number
                                                          I know my description
                         View an assignment
                                                                             Task Description
                                                          I know how many points I am worth
                                                                             Points
                                                          I know when I am due
                                                                             Due Date
   285   286   287   288   289   290   291   292   293   294   295