简体   繁体   中英

How to describe algorithms when doing Use Cases?

Let's say I'm making an Use Case for a game that has a scoring system. Each action you do in the game will increase/decrease your score in the game.

Here is a sketch of my Use Case :

1. ...
2. ...
...
8. The Player makes (some move).
9. The System registers the play and calculates his new score.

There is some algorithm behind calculating this new score. Should I state it in this Use Case ? Should I state it in another Use Case ? Should I simply omit the details of implementation of the algorithm?

Is the Use Case the correct place to state those kinds of things? Or should the Use Case just be concerned with the interactions between the Player and the System (the Game )?

I'd say I'd probably want to write down those details somewhere (if not just to make sure I really do understand them). So it looks to me maybe the best option is to make another Use Case where I describe how they work?

How are generally these kind of things done with Use Cases ? Thanks

Algorithms are not interaction between user and system to create something of value.

They're a footnote or an appendix to the use case.

They're often important, but they're not interaction. Hence putting them in an appendix.


Also. All use cases are initiated by the Actor. They actor wants to play they game; they initiate things. The system generally can't initiate action -- it's passive, responding to the actor.

Algorithms don't belong in use cases. Extract them to a business rules section or document.

I suggest you to use Activity Diagram to represent algorithms and leave your Use Case steps simple in this case. I also agree with "Johann Strydom" in his position.

Leo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM