Escolar Documentos
Profissional Documentos
Cultura Documentos
Tutorial
Use-Case for Monopoly game
• Monopoly game
• Use Case UC1: Play Monopoly Game
• Scope: Monopoly application
• Level: user goal
• Primary Actor: Person
• Stakeholders: Person: Wants to easily observe
the output of the game simulation.
Use-Case for Monopoly game
• Main Success Scenario:
• 1. Person enters number of players and requests new game initialization.
• 2. Person starts play
• 3. System displays game trace i.e dice total, player, square for next player move
• 4. Repeat step three until a winner or Person cancels.
• The following would be part of the supplementary specication in a RUP project:
• Domain Specic Rules: The rules for the game are:
• Two to eight players can play.
• A game is played as a series of rounds on a board comprised by 40 squares. During
a round, each player takes one turn.
• In each turn, a player advances his/her piece clockwise around the board a
number of squares equal to the sum of the numbers rolled on two six-sided dice.
• After the dice are rolled, the name of the player and the roll are displayed, as well
as the target square's name.
Use-Case Diagram
Domain Model
• Remember the key idea of the Domain Model:
• A domain model is a representation of real-world conceptual
• classes, not of software artifacts. It is not a set of diagrams
• describing software classes with responsibilities.
• Considering this, a possible Domain model for the given example
• would contain:
• MonopolyGame
• Die
• Board
• Player
• Piece
• Square
• 5
Domain Model of the Monopoly
Game
Sequence Diagram
• On Sequence Diagrams:
• Time flow is organized from top to bottom.
• Focus of control is shown using an activation box which
is optional, but commonly used.
• A return from a message may be shown as a dashed
open-arrowed line. Many practitioners exclude them.
• Messages sent to self can be illustrated using a nested
activation box.
• Conditional messages are shown in square-brackets.
Can be converted to communication diagrams and vice
versa.
System Sequence Diagram
• On System Sequence Diagrams:
• An SSD should be done for the main success scenario of the
use case, and frequent or complex alternative scenarios.
• Properties of an SSD:
• The UML does not define something called a system
sequence diagram.
• SSDs are part of the Use-Case Model (although not
• mentioned explicitly within the UP documentation) { a
visualisation of the interactions implied in the use cases.
• Treat the system as a black-box.
• Show user interaction(s) with the system and the actions
induced by these.
System Sequence Diagram
Public Library