volume_mute

Sequence Diagram - Data Collection Subsystem

publish date1969/12/31 00:00:00 UTC

volume_mute

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

WeatherStation sends a collect() message to each instrument; each instrument collects sensor readings and stores them locally; when WeatherStation later calls getData(), each instrument returns its stored readings

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


Quizzes you can take where this question appears