Skip to content

WA3. Door open system

statement

  • You are hired to develop a software system for motion detection and garage door control. The system should turn the garage door lights on automatically when it detects motion within a given perimeter.
  • The garage door opener should be possible to control either by a remote radio transmitter or by a manual button switch.
  • The opener should include the following safety feature. An “electric eye” sensor, which projects invisible infrared light beams, should be used to detect if someone or something passes under the garage door while it closes. If the beam is obstructed while the door is going down, the door should not close—the system should automatically stop and reverse the door movement.
  • The relevant hardware parts of the system are as follows (see Figure):
    • motion detector
    • external light bulb
    • motor for moving the garage door
    • “electric eye” sensor
    • remote control radio transmitter and receiver
    • manual opener button switch

questions

Assume that all the hardware components are available and you only need to develop a software system that controls the hardware components.

  1. Identify the actors for the system and their goals
  2. Derive only the use cases relevant to the system objective and write brief or casual text description of each
  3. Draw the use case diagram for the system
  4. For the use case that deals with the remote-controlled garage door opening, write a fully dressed description
  5. Draw the system sequence diagram(s) for the use case selected in (d)
  6. Show the operation contracts for the operations of the use case selected in (d)

solution

a. Identify the actors for the system and their goals

  • user: uses the planned system to open the door using the remote control or the button.
  • remote control: sends a signal to the system to open the door.
  • motion detector: detects motion within a given perimeter, and turns on the light bulb.
  • electric eye sensor: detects if someone or something passes under the door while it is closing, then stops closing the door, then opens the door fully.
  • remote receiver: receives the remote control signal from the user, and sends the signal to the motor to open the door.
  • manual button switch: user clicks the button, and sends the signal to the motor to open the door.
  • timer: counts the time for the door to open, and closes the door after the time is up.

b. Derive only the use cases relevant to the system objective and write brief or casual text description of each

  • user uses the remote control to open the door, the remote receiver receives the signal from the user, and sends the signal to the motor to open the door.
  • user clicks the button to open the door, the manual button switch receives the signal from the user, and sends the signal to the motor to open the door.
  • user opens the door and goes inside/outside, the timer should close the door automatically after the time is up.
  • user approaches the door, the motion detector detects motion, and turns on the light bulb.
  • user opens the door and goes inside/outside, then the user approaches the door again while it is closing, the door closing process should be reversed.
  • user opens the door, put something underneath, the door should never close.

c. Draw the use case diagram for the system

case diagram

d. For the use case that deals with the remote-controlled garage door opening, write a fully dressed description

  • user approaches the door, the motion detector detects motion, and turns on the light bulb.
  • user uses his/her remote control to open the door, the remote receiver receives the signal from the user, and sends the signal to the motor to open the door.
  • the motor works to open the door, and tells the timer to start counting the time from when the door was open.
  • when the time is up, the timer sends another signal to the motor to work in reverse and close the door.
  • please follow the diagram in the attached file to understand the sequence of events.

e. Draw the system sequence diagram(s) for the use case selected in (d)

sequence diagram

f. Show the operation contracts for the operations of the use case selected in (d)

  • Operation: open, remote control.
  • Responsibility: user clicks the button on his/her remote control and the door opens.
  • Cross Reference:
    • remote receiver will identify the remote control signal and authenticate the sender.
    • remote receiver can correctly pass the OPEN signal to the motor to open the door.
  • Exception:
    • if the remote control signal is not authenticated, the system should not open the door.
  • Precondition:
    • the door is closed.
    • the motor is connected to the door, and to the remote receiver.
    • light must turn on while opening the door.
    • the timer should start counting the time from when the door was open.
  • PostCondition:
    • the timer should be able to close the door after the time is up.
    • the door should remain close.
    • the light should turn off after the door is closed.

References

  • Marsic, I. (2012). Software engineering. Rutgers Unversity. https://www.ece.rutgers.edu/~marsic/books/SE/book-SE_marsic.pdf