Case Study Req

4
REQUIREMENTS
ANALYSIS
CASE STUDY
Initialize Use Case for Encounter
actors
Encounter
Use case
Initialize
player
Travel to
adjacent area
Encounter
foreign
character
designer
Set rules
Use case details
Initialize
1. System displays player’s
main character in the
dressing room.
2. System displays a window
for setting his character's
qualities.
3. Player allocates the
qualities of his main
character.
4. Player chooses an exit
from the dressing room.
5. System moves player’s
main character into the area
on the other side of the exit.
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Engage Foreign Character Use Case
Encounter
Use case
Initialize
player
Travel to
adjacent area
Engage
foreign
character
designer
Set rules
Use case details
Engage Foreign Character
1. System displays the
foreign character in the
same area as the player’s.
2. System exchanges
quality values between the
two characters.
3. System displays the
results of the engagement.
4. System displays player’s
character in a random
area.
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Conceptual Model of the System
Player
1
n
Plays
Has
1
1
1
EncounterGame
Entity
Relationship
Model
or
Object Model
ForeignCharacter
Has 1
MainCharacter
1
1
Has
Has
n
Engagement
n
1
Takes place in
Area
1
Data Flow Diagram: Explanation of Symbols
Processing
element
Get
deposit
Direction
of data flow
Check
deposit
Account #
& deposit
Data type
Data Flow Diagram: Explanation of Symbols
Processing
element
Input
Get
deposit
Direction
of data flow
User
Account #
& deposit
Output
Data type
Printer
…...
Check
deposit
Data store
balance
query
account
database
account
data
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Create
account
summary
member
banks
bank
name
Partial Data Flow
Diagram for ATM
Application
Get
deposit
Get
inquiry
User
error
account #
account #
& deposit
account
display
Validate
inquiry
Validate
deposit
account #
& deposit
Display
account
Make
inquiry
account #
Printer
account
data
Do
deposit
transaction
error
deposit
transaction
balance
query
account
database
account
data
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Create
account
summary
Partial Encounter State-Transition Diagram
Preparing
Setting up
Complete
setup
Waiting
Player
clicks
qualities
menu
Foreign
character
enters
area
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Engaging
Using Conditions in State-Transition Diagrams
state
event
Waiting
condition
Player
moves to
adjacent
area
[foreign
character
present]
[foreign
character
absent]
Engaging
condition
state
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sketch of Encounter State-Transition Diagram
Setting up
Player
completes
setup
Player
dismisses
report
window
Player
dismisses
set
qualities
widow
Reporting
Player
requests
status
Setting
qualities
Player
requests to
set
qualities
Foreign
character
enters area
Waiting
Player moves
to adjacent area
Player
quits
Foreign
character
enters area
Encounter
completed
Engaging
[foreign
character
absent]
[foreign character
present]
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sequence diagrams
Beginning of Sequence Diagram for Initialize Use Case
dressing
room:
Area
:EncounterGame
1. create
time
Beginning of Sequence Diagram for Initialize Use Case
note 1
:EncounterGame
main player
character:
Player Character
note 2
1. create
note 3
time
create
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
dressing
room:
Area
note 4
Sequence Diagram for Initialize Use Case
:EncounterGame
main player
character:
Player Character
:Player
quality
window
dressing
room:
Area
1*.1 create
1. create
User
2. create
3a. set quality values
3b. set quality values
4. select exit for character
5. move
* Numbering keyed to use case
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sequence Diagram Showing Concurrency
Player
:Encounter
-game
mainPlayerCharacter:
PlayerCharacter
freddie:
ForeignCharacter
create & display
move
(Concurrent player movement)
create & display
move
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Build a Sequence Diagram 1
1. Identify the use case whose sequence
diagram you will build
2. Identify which entity initiates the use case
– the user, or
– an object of a class
• name the class
• name the object
3. Draw a rectangle to represent
this object at left top
– use UML object:Class notation
4. Draw an elongated rectangle beneath this
to represent the execution of an operation
5. Draw an arrow pointing right from its top
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
myObject
:MyClass
Build a Sequence Diagram 2
6. Identify which entity handles
the operation initiated
MyObject
:MyClass
MyObject1
:MyClass1
– an object of a class
• name the class
• name the object
7. Label the arrow with the
name of the operation
– don’t show return
8. Show a process beginning,
using an elongated rectangle
9…… Continue with each new
statement of the use case.
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
My operation
Classes in Initialize Sequence Diagram
EncounterGame
- a class with a single object
PlayerCharacter
- with object mainPlayerCharacter
Area
- with object dressingRoom, and
PlayerQualityWindow
- a GUI class included to complete the use case.
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sequence Diagram for Initialize Use Case
:EncounterGame
main player
character:
Player Character
1*. «create»
1. «create»
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
dressing
room:
Area
Sequence Diagram for
Travel to Adjacent Area Use Case
User
:Connection
Hyperlink
:AreaConnection
:PlayerCharacter
:Area
1.1 hit
1.2 display other area
2.1 display
2.2 display
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sequence Diagram for Engage Foreign Character Use Case
Encounter
game
freddie:
Foreign
Character
anEngagement
: Engagement
1.1 create; display
1.2 create
2. execute
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Sequence Diagram for Engage Foreign Character Use Case
:Encounter
Game
freddie:
Foreign
Character
:Engagement
:Engagement
Display
:Player
Character
1.1 create; display
1.2 create
2.1 execute
2.2 change quality values
3.1 Display result
3.2 create
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Case Study
HCI Interfaces
Foreign Character Freddie’s Image
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Graphics reproduced with permission from Corel.
Player Character Image Options
Elena
Sean
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 20001), with permission.
Boris
Graphics reproduced with permission from Corel.
User Interface for Setting Quality Values
Sean
Current life points: 100.0
Choose the quality
you wish to set
Choose the value of
the quality selected
16.3
image
......
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Graphics reproduced with permission from Corel.
Sean
Current life points: 100.0
Choose the quality
you wish to set
Image
User Interface
for Setting
Quality Values
Choose the value of
the quality selected
16.3
Explanation
The values of the qualities not specifically chosen remain in the same
proportion to each other. Values less than 0.5 are counted as zero. E.g.,
before: strength = 10.0, endurance = 60.0, intelligence = 30.0, patience = 0.0
(current life points 10.0 + 60.0 + 30.0 + 0.0 = 100.0)
change: strength from 10.0 to 20.0
after:
strength = 20.0, endurance = 53.3, intelligence = 26.7
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
OK
Graphics reproduced with permission from Corel.
Encounter Courtyard
Image (including game
characters)
kitchen
COURTYARD
dressing
room
Get status
Set qualities
End game
living
room
User Interface for Status
Elena
Current life
OK
points: 56.38
Strength
Endurance
Endurance
Intelligence
Patience
Note: Each part
of this figure is
specified
separately in
section 3.
Value
16.18
Graphics
reproduced with
permission from
Corel.
Encounter Courtyard
Image
kitchen
COURTYARD
dressing
room
Get status
Set qualities
End game
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
living
room
Encounter Dressing Room Image
DRESSING ROOM
courtyard
dungeon
Get status
Set qualities
End game
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Encounter Dungeon
Image
DUNGEON
dressing
room
Get status
Set qualities
End game
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
study
Encounter Kitchen
Image
KITCHEN
Get status
Courtyard
Set qualities
End game
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Encounter
Living Room
Image
LIVING ROOM
courtyard
Get status
Set qualities
End game
study
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Encounter Study
Image
Living
room
STUDY
dungeon
Get status
Set qualities
End game
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Encounter Area Configuration (Desirable
Requirement)
Kitchen
Courtyard
Living
room
Dungeon
Study
Dressing
room
Key:
= connection
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
User Interface for Status
Elena
Current life
points: 56.68
Strength
Endurance
Endurance
Intelligence
Patience
Value
16.18
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
Graphics reproduced with permission from Corel.