Page 197 -
P. 197
180 Chapter 7 Design and implementation
Weather station use cases
Report weather—send weather data to the weather information system
Report status—send status information to the weather information system
Restart—if the weather station is shut down, restart the system
Shutdown—shut down the weather station
Reconfigure—reconfigure the weather station software
Powersave—put the weather station into power-saving mode
Remote control—send control commands to any weather station subsystem
http://www.SoftwareEngineering-9.com/Web/WS/Usecases.html
the systems in the environment of each weather station are a weather information sys-
tem, an onboard satellite system, and a control system. The cardinality information on
the link shows that there is one control system but several weather stations, one satellite,
and one general weather information system.
When you model the interactions of a system with its environment you should use
an abstract approach that does not include too much detail. One way to do this is to
use a use case model. As I discussed in Chapters 4 and 5, each use case represents an
interaction with the system. Each possible interaction is named in an ellipse and the
external entity involved in the interaction is represented by a stick figure.
The use case model for the weather station is shown in Figure 7.2. This shows
that the weather station interacts with the weather information system to report
weather data and the status of the weather station hardware. Other interactions are
with a control system that can issue specific weather station control commands. As I
explained in Chapter 5, a stick figure is used in the UML to represent other systems
as well as human users.
Each of these use cases should be described in structured natural language. This
helps designers identify objects in the system and gives them an understanding of
what the system is intended to do. I use a standard format for this description that
clearly identifies what information is exchanged, how the interaction is initiated, and
1 Control 1
System
1 1..n
Weather 1 1..n
Information Weather
Station
System
1 1..n
Figure 7.1 System
Satellite
context for the weather 1 Satellite 1
station