Skip to content

Latest commit

 

History

History
60 lines (31 loc) · 1.91 KB

s-chapter3.md

File metadata and controls

60 lines (31 loc) · 1.91 KB

Chapter 3 Solutions to Practice Exercises

Exercise 1-3

See Hand.java.

Exercise 4

Diagram File

Exercise 5

See Hand.java.

Exercise 6

See UniversalComparator.java.

Exercise 7

See Hand.java.

Exercise 8

Diagram File

Exercise 9

Solution intentionally not provided.

Exercise 10

See SortedHand.java.

Exercise 11

Diagram File

The code is a direct translation of the diagram.

Exercise 12

Diagram File

The details can vary. I chose to only include the methods in Foundations because that is the focus of the diagram. My modeling of the enumerated type is also a bit unorthodox in that I put in the field values (which should be underlined to show they are static, but that is not supported by JetUML, and the information can be inferred from the enum stereotype). I also named the association to CardStack, but left the association between CardStack and Card anonymous because, again, the focus was on the design of Foundations.


Creative Commons License

Unless otherwise noted, the content of this repository is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Copyright Martin P. Robillard 2019-2021