Page 175 -
P. 175

160     NGUYEN  AND  DILLON
                    Figure 9.5  A Domain Model for the Gymnastics System: The Preferred Model

                                1
                        Club                                       Meet
                       1                                              1
                          N                    N                      N
                               N        N            N        1            N        1  Competition
                      Gymnast                Team                Competition
                                                                                         Type
                       1                       1                      1
                       N     N                                        N
                                        N            N        1            N        1
                      Member                 Award                 Event               Event Type
                               1
                                                N                     N                    N
                                                                      N
                                                              1            N
                                                                   Judge



                      Now, there remain three binary fact types without a simple key and a quaternary fact type. The
                    three fact types (EventType is for Gender, Judge is qualified for EventType, Judge is assigned to
                    Event) are to be represented by three associations. The quaternary fact type can be represented by
                    class Award (or Score)—though an association class is also a possible choice.
                      With the choices that we have made, where most concepts are explicitly represented, we arrive
                    at the class diagram shown in Figure 9.5.

                    Additional Insight into Possible Class Diagrams

                    The above simple approach clearly shows the considerable extent to which the fact-based model
                    can facilitate the construction of the class model. Furthermore, the analysis also leads to an
                    interesting consequence, that is, we can have an understanding of a range of possible domain
                    models.
                      Here is how we arrive at this understanding. First, we note that for the model in Figure
                    9.5, every important concept is represented explicitly. Now, if we go to the other extreme and
                    represent the fact type groups for Competition, Event, Team, Member (groups 8–11) implicitly
                    as associations, we would get the model shown in Figure 9.6. Though strange-looking and
                    not intuitively appealing, it is still a legitimate domain model in which information about the
                    application domain is represented as objects (instances of classes) and links (instances of as-
                    sociations). The two models presented are essentially the two extremes. Other possible models
                    are those between these two extremes, depending on how we choose to represent certain groups
                    of fact types.

                    A COMPARISON ON THEORETICAL GROUNDS

                    Having covered the practical use of the text analysis and the fact-based approach, we now examine
                    and contrast their basic premises. The comparison should provide a deeper insight into the differ-
                    ences between the two approaches.
   170   171   172   173   174   175   176   177   178   179   180