Exercise - Alternative Ways of Modeling
Since the model is always developed with a particular purpose in mind, there is no single best solution. Below we present some alternatives, which are equally valid because the exercise was not completely constrained, i.e., it did not describe the context in which the model is to be used.
abstract Book
// mandatory, although conceptually subtitle is a point about title as well
or format// the choice between xor and or depends on the context. For example,
paper// whether the book store has a single entry for a book with multiple
hardcover ?// formats or whether there must be a separate entry with exactly one
electronic// format at the time
enum Kind = textbook | manual | reference | fiction | nonfiction | other
However, we cannot have other -> string
in the
enumeration.
Module Statistics:
|
All clafers: 17 | Abstract: 2 | Concrete: 15 | Reference: 4 | Constraints: 7 | Goals: 0 | Global scope: 1..* | Can skip name resolver: no
|
Back Introduction