O'Reilly logo

Learning UML by Sinan Si Alhir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Exercise Solutions

This appendix contains solutions to the exercises. Note that for many problems, there may be multiple viable solutions.

For exercise questions involving figures, the figures for each step show only the solution for that particular step and not for the whole question (which would include the solutions to previous steps in the question). At the end of each question, all the figures for all the steps in the question are combined to produce a final solution to the question.

Structural Modeling

The next few sections present solutions for Part II.

  1. The figure shows a Report class.

    The class has the following attributes:

    • NextID, which is private, holds an integer value, is initialized to 1, and is shared by all the objects of the class.

    • ID, which is private, holds an integer value, is not initialized to any value, and is specific to each object of the class.

    • Name, which is private, holds a string value, is initialized to an empty string, and is specific to each object of the class.

    • CreationDate, which is private, holds a string value, is initialized to an empty string, and is specific to each object of the class.

    • SectionName, which is private, holds one or more ordered string values that are initialized to an empty string, and is specific to each object of the class.

    • ProjectName, which is private, holds one or more unordered string values that are initialized to an empty string, and is specific to each object of the class.

    • OwnerName, which is private, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required