






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Sp01 Final Exam Review: Design an Alarm System
See Final Exam Review - Sp2001
Comments? Answers? Criticisms?
______________
| Sensor |
0..x |————–|
—————–>| status |
| sensors|————–|
| | isTripped |
| | reset |
| |______________|
| /\ /\
| /__\ /__\
| | |
| _____|_____ ___|____________
| | FireSensor| | IntruderSensor |
| |___________| |________________|
|
|
______|______ 0..x vicinities
| Vicinity |<------\ contancts __________
|————-| 1 | —–>| Contact |
| status |——-/ | 0..x |__________|
| name | |
|————-|———————
| name |
| isTriggered | 1 0..x _____________
| reset |——————–>| Response |
| update: | responses |————-|
|_____________| |————-|
| trigger |
| reset |
|_____________|
/\ /\ /\
/__\ /__\ /__\
___________________| | |
| __________|__ |___
_______|_______ | Siren | ___|_______
| Messenger | |_____________| | Sprinkler |
|—————| |___________|
|—————|
| sendMsg:to: |
|_______________|
Doug Powers Bryan Kennedy
Not bad. Are contacs a seperate object? If so, could you have the sendMsg:to: modified in contacts (ie sendMsg:to:vicinity:), getting rid of subclassing in response.
/————-\
| contacts |
| ————- |
| name |
| link |
| ————- |
| sendMsg: |
\————-/
in vicinity, contacts would be an ordered collection, and you would call the sendMsg: with a doall loop
John Thomas McDole
Link to this Page