• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1135
  • Last Modified:

Can someone help me write a Use case Diagram?

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!
0
deucalion0
Asked:
deucalion0
  • 6
  • 5
1 Solution
 
DarrenDCommented:
Hi,

The use case diagram is not really used to show the detail that you are going into here. You would probably be best looking at an activity diagram for this detail. The use case is mainly used at a business level to show people an overall view of the functionality each actor has with the system but at a much higher level than what you are trying to show.  Putting a lot of detail into a use case in my opinion is not a great idea. I would leave these details for activity, class and sequence diagrams.

Also, there is no real way of showing loops in Use Case Diagrams as this is not what they are for.

Have a look at this and the incorrect diagrams...
http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html

Here are some links to activity diagrams...
http://www.agilemodeling.com/artifacts/activityDiagram.htm
http://www.ibm.com/developerworks/rational/library/2802.html
http://www.altova.com/umodel/activity-diagrams.html
http://www.visual-paradigm.com/VPGallery/diagrams/Activity.html

Let me know if you have any questions.

Hope this helps,

Darren
0
 
DarrenDCommented:
0
 
DarrenDCommented:
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
deucalion0Author 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!!!!
0
 
DarrenDCommented:
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
0
 
deucalion0Author 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!!!
0
 
deucalion0Author 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
0
 
DarrenDCommented:
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
0
 
deucalion0Author 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!

:)
0
 
DarrenDCommented:
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
0
 
deucalion0Author 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!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now