100% found this document useful (1 vote)
644 views7 pages

Es 4 Solution

The document describes an exercise to model an elevator control system using UML diagrams. It includes requirements for calling and selecting floors. It provides tasks to create a use case diagram, describe the "Select Floor" use case, make a class diagram, and provide sequence, collaboration, and activity diagrams for the "Select Floor" use case. The solution provides the requested UML diagrams to model the elevator control system and the "Select Floor" use case.

Uploaded by

shimelis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
644 views7 pages

Es 4 Solution

The document describes an exercise to model an elevator control system using UML diagrams. It includes requirements for calling and selecting floors. It provides tasks to create a use case diagram, describe the "Select Floor" use case, make a class diagram, and provide sequence, collaboration, and activity diagrams for the "Select Floor" use case. The solution provides the requested UML diagrams to model the elevator control system and the "Select Floor" use case.

Uploaded by

shimelis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Business Process Management

Exercise n.4
1 - Create the use case diagram according to the following elevator control system
functional requirements:

1. The elevator control system shall allow the passenger to call the elevator and to select the destination
floor;
2. When the passenger pushes the external button (to call the elevator), or the internal button (to select the
destination floor), the central control system switches the button light on;
3. When the passenger calls the elevator or selects the destination floor, the central control system
opens/closes the elevator door;
4. When the passenger calls the elevator or selects the destination floor, the central control system
moves/stops the elevator to/at the passenger call floor or to/at the passenger destination floor.
5. When the passenger leaves the elevator, the central control system switches the button light off.

Also, describe the use case “Select Floor” by specifying:


• Use case name
• Participating actors
• Description
• Entry conditions
• Flow of events (see use case description at point 3. Pay attention: consider JUST the
interface events)
• Exit conditions

2 - Create the Class diagram of the elevator control system.

3 - According to the following description of the “Select Floor” use case, create the
1) Sequence, the 2) Collaboration and the 3) Activity diagram:
1. The passenger pushes the destination floor button (internal button);
2. The internal button sends the system the order to select the direction (up/down);
3. The system changes the elevator status (from idle to busy);
4.The system switches the floor button (internal button) light on;
5. The system closes the elevator door;
6. The system moves the elevator according to the destination floor direction (up/down);
7. The elevator sends the system the order to control if the floor that the elevator is going to get through is
the destination one;
8. The system stops the elevator at the destination floor;
9. The system opens the door at the destination floor;
10. The passenger moves outside the elevator;
11. The system switches the internal button off.

4 - Create the Statechart diagram of the object “Elevator”.


Business Process Management

Solution 1. Use-case diagram of the “Elevator control system”

Switch the Button


light on/off Open/Close Door Move/Stop Elevator

«uses» «uses» «uses» «uses» «uses» «uses»

Call Elavator Select Floor

Passenger

Solution 1. Description of the use case “Select Floor”


Use case name Select Floor
Participating actors Passenger
Description It allows to move the passenger to the desired floor.
Entry condition The passenger is inside the elevator
Flow of events 1. The passenger pushes the destination floor button
(internal button);
2.The system switches the floor button (internal
button) light on;
3. The system closes the elevator door;
4. The system moves the elevator according to the
destination floor direction (up/down);
5. The system stops the elevator at the destination
floor;
6. The system opens the door at the destination floor;
7. The passenger moves outside the elevator;
8. The system switches the floor internal button off.
Exit condition The passenger is outside the elevator in the desired
floor; the elevator is idle
Business Process Management

Solution 2. Class diagram of the “Elevator control system”

Elevator
-Direction : Boolean Central Control System Door
-Current floor : Integer communicates controls
-Closed : Boolean
-Idle : Boolean
+Select direction() +Open()
+Move() 1 1
+Control current floor() +Close()
+Stop()
+Change status()
1
communicates

Button
-Lighted : Boolean
-Pushed : Boolean
+Switch the light()

Internal Button External Button


-Floor number : Integer
Business Process Management

Solution 3. Sequence diagram of the use case “Select Floor”

Internal Button Central Control System Elevator Door


Passenger

Select floor number()

Select direction(floor number)

Change status(busy)

Switch the light(on)


Close()

Move(direction)

Control current floor (floor number)

Stop()

Open ()

Switch the light (off)


Business Process Management

Solution 3. Collaboration diagram of the use case “Select Floor”

Passenger
1. Select floor number

2. Select direction(floor number)


4. Switch the light(on) 5. Close()
10. Switch the light (off) 9. Open ()

Internal Button Central Control System Door


7. Control current floor (floor number)

3. Change status(busy)
6. Move(direction)
8. Stop ()

Elevator
Business Process Management

Solution 3. Activity diagram of the use case “Select Floor”

Passenger Elevator Control System

Push destination floor button Select destination floor direction (up/down)

Change elevator status(from idle to busy)

Switch internal button light on

Close door

Move elevator to destination floor direction

Control current floor


[<Current floor
NOT=
Destination floor>]

[<Current floor = Destination floor>]

Stop elavator at destination floor

Move outside the elavator Open door at destination floor

Switch external button light off


Business Process Management

Solution 4. Statechart diagram of the object “Elevator”

Stop()/Current floor=Floor number Stop()/Current floor=Floor number


Going up At the floor Going down

Move(up)/Direction=up Move(down)/Direction=down

You might also like