9.5 Exercises
Solutions to these exercises are supplied in Section B.3.1
Describe Figure 9-8: identify stereotype
definitions, tag definitions, and constraints.
Describe Figure 9-9: identify stereotyped elements
and tagged values.
Describe Figure 9-10: identify stereotyped elements
and tagged values.
Create a diagram to communicate the following details:
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.
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.
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:
A team has members represented using a Member
class that is stereotyped as a Person rather than
a Team class.
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.
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:
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.
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.
|