9.5 Exercises

Solutions to these exercises are supplied in Section B.3.1

  1. Describe Figure 9-8: identify stereotype definitions, tag definitions, and constraints.

    Figure 9-8. Stereotype definitions, tag definitions, and constraints
    figs/Luml_0908.gif
  2. Describe Figure 9-9: identify stereotyped elements and tagged values.

    Figure 9-9. Stereotyped elements on a class diagram
    figs/Luml_0909.gif
  3. Describe Figure 9-10: identify stereotyped elements and tagged values.

    Figure 9-10. Stereotyped elements and tagged values on an object diagram
    figs/Luml_0910.gif
  4. Create a diagram to communicate the following details:

    1. Define the concept of a person using a Person stereotype, which may be applied to classes. The Person stereotype defines a tag named ID, which is a string representing a person's identification number. The ID tag may not be an empty string.

    2. Define the relationship between a person and organization using a Member Of stereotype, which may be applied to associations. The Member Of stereotype defines a tag named Joining Date, which is a string representing the date on which a person joined an organization. The Joining Date may not be an empty string.

  5. Update the diagram shown in Figure 9-9 stepwise to show the following details. After each step, check your answers against the solutions shown in Appendix B:

    1. A team has members represented using a Member class that is stereotyped as a Person rather than a Team class.

    2. Objects of the Member class are associated with teams represented using an association that is stereotyped using the Member Of stereotype rather than the Made Of stereotype.

  6. Update the diagram shown in Figure 9-10 stepwise to show the following details. After each step, check your answers against the solutions shown in Appendix B:

    1. All Person class objects become Member class objects stereotyped using the Person stereotype. The Andy object's ID tag has a tagged value of 1. The Jonathan object's ID tag has a tagged value of 2. The Si object's ID tag has a tagged value of 3.

    2. All Person class objects become members of teams using associations stereotyped using the Member Of stereotype, and each of the links has a tagged value of TBD (to be determined) for the Description tag.