We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Can someone help me write a Use case Diagram?

deucalion0
deucalion0 asked
on
Medium Priority
1,224 Views
Last Modified: 2016-05-20
I have created a game that is similar to Simon says, except with Arrows.

 Eight arrows one in each direction, the game shows an arrow and the player needs to point a Nintendo Wii remote in that direction then Press a button to submit that direction. The levels increase with an additional arrow being added per level, so the player needs to remember all the arrows. The game has the Wii remote connected to it but also an Infrared box which sends a signal to a Robot, the robot receives a code and does something, i.e. laugh, burp dance etc....

So creating a use case diagram is proving tricky, as I have no idea how much I need to include. I have four actors.

Player, Robot, wii remote and infrared box.

I am breaking the game down like so:

The Player launches the game
The software creates a connection to the Bluetooth hardware, infrared hardware and robot hardware
The infrared sends a signal to the robot
The robot does something
The player access the game manual by pressing a button
The infrared sends a signal to the robot
The robot does something
The player exits the manual by pressing a button
The infrared sends a signal to the robot
The robot does something
The infrared sends a signal to the robot
The robot does something
The player starts the game by pressing a button
The infrared sends a signal to the robot
The robot does something
The player begins to play level one by pressing a button
The infrared sends a signal to the robot
The robot does something
The player completes level one
The infrared sends a signal to the robot
The robot does something
Or
The player fails the level
The infrared sends a signal to the robot
The robot does something
The player restarts the game by pressing a button
The infrared sends a signal to the robot
The robot does something
Or the player quits the game by pressing a button
The infrared sends a signal to the robot
The robot does something

I have eight levels and need to somehow figure out how exactly to write this use case diagram. I do not know how much to include and how much to leave out, a lot of the events repeat so maybe this all goes into a loop?

Any advice on how to create a use case UML diagram would be very much appreciated!
Comment
Watch Question

Project Manager / Technical Lead
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
DarrenProject Manager / Technical Lead
CERTIFIED EXPERT

Commented:
DarrenProject Manager / Technical Lead
CERTIFIED EXPERT

Commented:
As you can see from the above link, the use case is at a higher level of abstraction than pressing a button which is a lower level and can be shown in an activity diagram.

Thanks,

Darren

Author

Commented:
Hey DarrenD thanks a lot for all that information, it was a great relief to see some answers here this morning! :)
So I have read all the links regarding the use case diagram and I have had a go at creating my diagram, could you please have a look at it and tell me what you think?

It was all just figuring out what should be included and what to leave out. There is just that much going on in the game with all the hardware and connections!

I will also create activity diagram, although this is not required, but I think it would be great to have and help explain things. Also the requirements specification is quite tricky as I have the Volere template which is 95 pages loing and I need to edit it down, I was using another template but it doesnt cover everything I need. The site you gave me alink to has a requiremenst spec so that should help!

Here is my use case diagram, any tips would be great!
 Use case
DarrenD thanks again for your time on this!!!!
DarrenProject Manager / Technical Lead
CERTIFIED EXPERT

Commented:
Hi again,

The diagram you have is fine. All you need to show is how the user and external devices are going to interact with the system which is fine. Use case diagrams do not work well if they become too big. I use them to explain to managers the functionality that their staff will have using the system and thats about it.

For example if I was going to show a use case to "create an employee", "delete employee", "update employee", "search for an employee" etc...  I would use a single use case called "Employee Maintenance" to keep it simple ... if you get what I mean.

For use cases you should think what (functionality) can the user perform on the system, not how the user does something. Then in the Use case descriptions you can put a little more detail and some preconditions and post conditions.

Other things to think about might be security, does the player have to login/logout if it is a web game?

Thanks,

Darren

Author

Commented:
Hi DarrenD, I am going to creating a sequence diagram as well, which should explain more about ho everything interacts, I hope. When you mention that I need to show how th eexternal devices interact, should this be as a circle that all external devices connect to in the diagram showing how they all connect to the system?  Also when you say use case descriptions do you mean the text that goes into the circles? I will keep reading up and trying things out.

Thanks!!!

Author

Commented:
Hey I made some changes after reading your advice, could you have another quick look for me and tell me if this makes sense?

Many thanks!!!

 Use case 2
DarrenProject Manager / Technical Lead
CERTIFIED EXPERT

Commented:
Hi,

When I say descriptions, I mean the text for each use case. If you scroll down this link you can see that each use case is described in a little more detail seperately.

http://www.soberit.hut.fi/T-76.115/02-03/palautukset/groups/GameMasters/de/docs/requirements/requirements.html

The way you have shown the external devices as input devices and the system receiving input is fine.

Darren

Author

Commented:
Hey DarrenD, that makes perfect sense, I shall adopt that idea and explain actor and its use case separately, the best I can.

Thanks again for all your help, you have saved me a lot of stress!

:)
DarrenProject Manager / Technical Lead
CERTIFIED EXPERT

Commented:
Hi,

On the changes you have made. I see what you are trying to do but it is getting a bit messy already and I don't think that you need to show that the game is going to connect to the hardware as this is not something that the player is going to interact with. The player will use the Wii remote but you don't show this as the Wii remote is hardly going to play by itself.

Remember that this diagram is high-level...

In my opinion the first diagram you had is fine. I think you are trying to put too much into it.

Also as a side note I have only found one web site where there is a pointed arrow from the actor to a use case. I think it should be an arrowless line.

Hope this helps,

Darren

Author

Commented:
Hey Darren, we were taught to use a program called DIA, and to use the arrows, I have taken into consideration that all the examples have no arrows, I was checking this out myself earlier, and it was confusing. I will for the purpose of this coursework leave them as arrows, but keep in mind that this is not common.

I have changed my use case diagram back to the way it was and removed the system actor, it is all about getting used to why and what use case diagrams are for, once I get into it a bit more it should hopefully be straight forward in all scenarios!

Thanks!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.