Sequence Diagram - Data Collection Subsystem
publish date: 1969/12/31 00:00:00 UTC
In a sequence diagram showing the interaction between the data collection subsystem and instruments (e.g., Anemometer, Barometer) in the weather station, what sequence of messages correctly describes how the WeatherStation collects data from instruments?
Correct Answer
Explanation
In the data collection sequence: the WeatherStation (driven by a clock signal transitioning to Collecting state) sends a collect() message to each instrument object; each instrument object (Ground thermometer, Anemometer, Barometer) collects data from its associated sensor and stores it locally; WeatherStation then calls getData() on each instrument to retrieve the collected readings. The instruments operate autonomously - they collect data at the specified frequency and deliver it to WeatherData on request.
Reference
Software Engineering, Ian Sommerville, 10th edition
