An Example Specification for

Implementing a Car Lock Component

Draw the UML diagrams for a remote car-key system allowing the user to click 'lock' button once to lock door, click twice to enable alarm, and click 'unlock' button once to disable alarm, click twice to unlock door.

In the specification using UML, we will draw the following four different types of UML diagrams - the class diagram, the state diagram, the sequence diagram and the collaboration diagram - to describe a remote car-lock system allowing the user to click 'lock' button once to lock door, click again to enable alarm, and click 'unlock' button once to disable alarm, click again to unlock door.