刚刚开始学 还是很不懂请教一个题目 Suppose that an environmental monitoring station contains three sensors, namely a thermometer, a rain gauge and a humidity reader. In addition, there is an output device, known as a printer, on which the readings from these three sensors are shown. Readings are taken and transcribed onto the printer every five minutes. this process is known as 'taking a checkpoint'
a. draw an object diagram shwoing a plausible configuration for these objects, and include on the diagram the messages that might be generated in the system every time a checkpoint is taken. assume that a checkpoint is initiated by a message sent from a timer object to the monitoring station.
b. does your diagram clearly show the order in which messages are sent? if not, how might this be shown?
c. draw a class diagram summarizing the structure of the monitoring station.我知道题目很简单的挖 有谁可以给图啊? 谢谢啊
a. draw an object diagram shwoing a plausible configuration for these objects, and include on the diagram the messages that might be generated in the system every time a checkpoint is taken. assume that a checkpoint is initiated by a message sent from a timer object to the monitoring station.
b. does your diagram clearly show the order in which messages are sent? if not, how might this be shown?
c. draw a class diagram summarizing the structure of the monitoring station.我知道题目很简单的挖 有谁可以给图啊? 谢谢啊
a 画一个图shwoing对象为这些对象的合理配置,并在图中的可能在系统每次生成的邮件包含一个检查站采取。假定一个检查点开始站的监测由一个消息发送到一个计时器对象。
b 你的图清楚地显示在哪些邮件发送顺序?如果不是,如何会这样显示?
c 画一个类图总结了监测车站结构。翻译软件还是很好用的
学习了。
貌似缺少一个message对象,包含3个sensor的读数以及 message_no???不知道怎么叫,它这里貌似要求每次读数的顺序。
does your diagram clearly show the order in which messages are sent? if not, how might this be shown?不知道说的对不对,不大懂UML。
有道理 message也应该是一个对象 我再看看 怪不得我总觉得少了什么
a. draw an object diagram shwoing a plausible configuration for these objects, and include on the diagram the messages that might be generated in the system every time a checkpoint is taken. assume that a checkpoint is initiated by a message sent from a timer object to the monitoring station.reply:这里通过控制定时调用measurementsChanged方法(其方法通过getters来获取各气象监控信息,事先由传感器注入),来控制事件通知的频度
b. does your diagram clearly show the order in which messages are sent? if not, how might this be shown?reply:消息发送的顺序可以人为固定,等三个传感器数据都到了MonitoringStation之后,集中定时通知Observers,通过分别调用各Observer的update方法并连带display,Pinter中一些相应域数据忘写了c. draw a class diagram summarizing the structure of the monitoring station.reply: as upper pic has shown