CS 2401 Programming Assignment Unit 3
CS 2401 Programming Assignment Unit 3
Software Engineering 1
Programming Assignment Unit 3
Actors:
1. Homeowner: Wants to control the garage door and ensure safety.
2. Motion Detector: Detects motion within the perimeter.
3. External Light: Provides illumination when motion is detected.
4. Garage Door Motor: Opens and closes the garage door.
5. Electric Eye Sensor: Detects obstructions while the door is closing.
6. Remote Transmitter: Sends signals to open/close the garage door remotely.
7. Manual Opener Switch: Allows manual control of the garage door.
b. Derive only the use cases relevant to the system objective and write brief or casual text
description of each
Use Cases:
1. Detect Motion and Turn On Light: When motion is detected within the perimeter, the system
turns on the external light.
2. Open Garage Door Remotely: The homeowner uses a remote transmitter to open the garage
door.
3. Open Garage Door Manually: The homeowner uses a manual switch to open the garage door.
4. Close Garage Door with Safety Check: The system closes the garage door but stops and
reverses if the electric eye detects an obstruction.
Preconditions:
- The garage door is closed.
- The remote transmitter has power.
Postconditions:
- The garage door is fully open.
e. Draw the system sequence diagram(s) for the use case selected in (d)
f. Show the operation contracts for the operations of the use case selected in (d)
Preconditions:
- Garage door is closed.
- Remote transmitter is functional.
Postconditions:
- Garage door is open.
- System status is updated to "Door Open".
Exceptions:
- If the door fails to open, the system status is updated to "Error".
References:
Marsic, I. (2012, September 10). Software engineering. Rutgers: The State University of
New Jersey. https://my.uopeople.edu/pluginfile.php/57436/mod_book/chapter/46513/
CS4403MarsicTextbook.pdf
Ambler, S. (2003-2018). UML 2 Use Case Diagrams: An Agile
Introduction. Agile Modeling. http://www.agilemodeling.com/artifacts/useCaseDiagram.htm