CS 3371 - March 29, 2000

  1. Write a flow of events description for this collaboration diagram:

  2. Use a nested number scheme to renumber the messages on the collaboration diagram of question 1 to show that :B sends msgE in order to be able to respond to msgW, and that :C first sends msgT and then sends msgY before responding to msgR .

  3. Develop a sequence diagram modeling the interaction from the collaboration diagram of question 1.
    A diagram based on questions 1 and 2

  4. The note on the collaboration diagram says that this is not a good design. Which interactions make us suspicious of the design?

  5. Suppose that an object O contains an object P, and that O no longer needs P. How is P destroyed ...

    1. In C++?
    2. In Java?

  6. Develop a collaboration diagram with nested numbering modeling a scenario in which:

    1. An actor sends a message to an object of class O.
    2. O creates a new object of class P.
    3. P sends a message requesting an integer value, say n, to an object of class Q.
    4. After receiving the response from Q, if n is not zero, P sends a message to O.
    5. O destroys P.

  7. Develop a sequence diagram modeling the scenario from question 5.