Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline 1. Exercise on use case diagram

Similar presentations


Presentation on theme: "Outline 1. Exercise on use case diagram"— Presentation transcript:

1 Outline 1. Exercise on use case diagram
2. Exercise on state chart diagram 3. Exercise on class diagram 4. Q & A

2 Use case diagram Question: Develop at least 4 use cases for the elevator system Located at downtown Atlanta, GSU has many tall buildings. For these buildings, elevators are necessary to transport passengers between different floors. To use an elevator, passengers call the elevator using the call buttons outside the elevator on the floors. When an elevator arrives on a floor, it opens its door to allow passengers to enter into the elevator. Passengers in the elevator determine their destination floors by pushing the buttons inside the elevator. Then the door closes and the elevator moves to the destination floor, where the door opens to allow passengers to walk out. When the elevator is idle, an open door will automatically close (saying after 30 seconds) and the elevator will automatically move to a default floor (saying after 2 minutes). Since these are passenger elevators, safety is crucial. One safety feature is that when the door is closing and the elevator detects a person (or object) in the door way, the door will open to avoid injury.

3 Use case diagram Question: Develop at least 4 use cases for the elevator system Use case 1: Transport passengers to destination floor Use case 2: Move to the default floor (automatically) Use case 3: Avoid injury (open door if detecting object in door way) Use case 4: Share ride (e.g., open door when pressing elevator button) Use case 5: Hold elevator ……

4 State chart diagram Question: Develop a state chart diagram for the bank machine (consider only the problem statement described in Question 1). To add credit to the Cash-Card, the Card-Owner needs to use a Bank-Machine. The typical activities that go between the Bank-Machine and the Card-Owner are as follows: The machine requests the Card-Owner to enter his/her PIN (Personal Identification Number). Having obtained and verified the Card-Owner PIN, it then requests the amount to be added to the Cash-Card. Having obtained the amount, Bank-Machine accordingly credits the Cash-Card, shows the balance and issues the transaction record to the customer.

5 State chart diagram Question: Develop a state chart diagram for the bank machine (consider only the problem statement described in Question 1). Wrong PIN Card inserted Idle Wait for PIN cancel Terminate PIN entered Show balance Wait for Amt Amt entered Wrong Amt

6 Class diagram Question: Develop a class diagram for the elevator system

7 Class diagram Question: Develop a class diagram for the elevator system Applying Abbott’s textual analysis technique Elevator controller: idle time, state | setState(), informBlocked() Door: open/close() Elevator: move up/down/stop() Button (elevator button, door button): pushed Building Floor

8 Q & A


Download ppt "Outline 1. Exercise on use case diagram"

Similar presentations


Ads by Google