0% found this document useful (0 votes)
122 views1 page

Creating A UML Design From Scratch - Sequence Diagram

The document describes a sequence diagram for a coin game where a random player is selected to flip a coin and pick heads or tails, their choice is set, then the actual coin flip outcome is checked against their choice to determine a winner.

Uploaded by

Hoang Nhu Vinh
Copyright
© Attribution Non-Commercial (BY-NC)
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
0% found this document useful (0 votes)
122 views1 page

Creating A UML Design From Scratch - Sequence Diagram

The document describes a sequence diagram for a coin game where a random player is selected to flip a coin and pick heads or tails, their choice is set, then the actual coin flip outcome is checked against their choice to determine a winner.

Uploaded by

Hoang Nhu Vinh
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 1

SEQUENCE DIAGRAM :CoinGame opt [flip again] alt [randomPlayer = player1] getRandCoinOption():String [playerpick] player1:Player player2:Player

setCoinOption(String):void

[randomPlayer = player2]

getRandCoinOption():String

[playerpick]

setCoinOption(String):void

theCoin:Coin

"create"

getCoinOption():String

[winningFlip]:

didPlayerWin(winningFlip() player1:Player

didPlayerWin(winningFlip() player2:Player

You might also like