Page 203 -
P. 203

186   Chapter 7   Design and implementation


                                Weather
                            Information System

                                               :SatComms    :WeatherStation  :Commslink     :WeatherData

                                     request(report)

                                      acknowledge
                                                    reportWeather( )
                                                      acknowledge   get(summary)    summarize( )



                                                      send(report)
                                                      acknowledge
                                      reply(report)

                                      acknowledge




                                    2.  Sequence models, which show the sequence of object interactions. These are
                   Figure 7.7 Sequence
                   diagram describing   represented  using  a  UML sequence or a  collaboration diagram. Sequence
                   data collection      models are dynamic models.

                                    3.  State machine model, which show how individual objects change their state in
                                        response to events. These are represented in the UML using state diagrams.
                                        State machine models are dynamic models.
                                       A subsystem model is a useful static model as it shows how a design is organized into
                                    logically related groups of objects. I have already shown this type of model in Figure 7.4
                                    to show the subsystems in the weather mapping system. As well as subsystem models,
                                    you may also design detailed object models, showing all of the objects in the systems
                                    and their associations (inheritance, generalization, aggregation, etc.). However, there is
                                    a danger in doing too much modeling. You should not make detailed decisions about the
                                    implementation that really should be left to the system programmers.
                                       Sequence models are dynamic models that describe, for each mode of interaction,
                                    the sequence of object interactions that take place. When documenting a design, you
                                    should produce a sequence model for each significant interaction. If you have devel-
                                    oped a use case model then there should be a sequence model for each use case that
                                    you have identified.
                                       Figure 7.7 is an example of a sequence model, shown as a UML sequence dia-
                                    gram. This diagram shows the sequence of interactions that take place when an
                                    external system requests the summarized data from the weather station. You read
                                    sequence diagrams from top to bottom:
                                    1.  The SatComms object receives a request from the weather information system
                                        to collect a weather report from a weather station. It acknowledges receipt of
   198   199   200   201   202   203   204   205   206   207   208