Never tell people how to do things.
Tell them what to do and they will surprise you with their ingenuity.
– George S. Patton, Jr., War
As I Knew It, 1947
In this lab, you will work on two related activities:
- Build a use-case model.
- Work with your teammates and us to do a preliminary
use case analysis of our team project, recording the results for
eventual use in your Elaboration
The Monopoly Example
For the next few weeks, the labs in this course will use the game of Monopoly as an
example¹. If you’re not familiar with the rules of the
game, you find them on-line (e.g., http://www.centralconnector.com/GAMES/MONOPOL.html)
or work with someone else who is. We will envision an on-line game
playing system that runs a multi-player monopoly game and also
maintains player statistics from game to game.
UML is a modelling language that is supported by a number of tools.
One such tool, StarUML,
is an open source tool that is very much like other more costly
commercial UML tools (e.g., IBM Rational
Rose, iLogix Rhapsody, SPARX Enterprise Architect).
You can choose to use it, some other tool, or simply hand-draw your
UML diagrams. This section contains a short StartUML tutorial if you
should choose to use it.
This is an optional section useful only if you choose to use
StartUML. The main StarUML window is shown here:
browser to make this image easier to read, or click on the image
itself for an enlarged view.
Note the following features in StarUML’s main window:
- The “Main” use case diagram in the center, which
shows a high-level use case model for the example system.
- The “Tool Box” on the left, which provides the
use case model diagram elements.
- The “Model View” in the upper right, which shows
all the diagrams and diagram elements created so far
- The “Documentation” pane in the lower right,
which shows the textual use case for the highlighted use model
Use Case Diagrams in StarUML
StarUML is generally pretty easy to use for any of the UML diagram
types, so you should be able to find your way around pretty well.
Start by downloading the sample UML model for the Monopoly system to
your hard-drive(monopoly.uml) and
loading it in StarUML. Search around the model a bit and do the
Open the “Main” use case diagram - You can find
this in the “Model Explorer” pane on the upper right
under “Monopoly”-“Use Case
- Find the written use cases - You can find these as
I’ve written use cases for “Play Monopoly” and
- Click on use case in the “Use Case View”
- Open the “Documentation” pane in the lower
right. If the “Properties” pane is displayed there,
choose the “Display” tab at the very bottom.
Use the toolbox - The “Toolbox” on the left will
provide the basic UML modeling elements for the type of model you
are currently displaying in the main workspace.
- Change the name of an element - This is not as easy as
it should be in StarUML. You do it as follows:
- Click on the element in the Model Explorer
- Change its name property in the “Properties”
pane in the lower right. You may have to switch back to the
“Properties” pane from the “Documentation”
- Distinguish between graphical views and model elements
- UML tools tend to distinguish between the graphical presentation of
an item (say the “Player” actor shown in the
“Main” use case diagram) and the actual model element
itself (shown as “Player” in the “Model
Explorer” pane on the right). You can remove the presentation
without deleting the underlying model element. Try this by doing the
If you really want to remove an element for good, click mouse right
on the element in the Model Explorer and choose “Delete from
- Delete the player from the diagram canvas
- Find the player element in the Model Explorer and drag it
back onto the diagram canvas. The player icon and the relationships
should come back.
- Build a new StarUML model - Finally, for this
week’s homework, you’ll need
to know how to create a new model. You can do this as follows:
- Start StarUML - StarUML is Win32-based, and is
available on the Windows start menu.
- Create a New Project - Select the Rational Approach
as your “Default Approach”.
- Open the “Main” Use Case Diagram - The
new project automatically creates a default use case diagram under
“Use Case View”-“Main” in the Model
- Build the Model - Use the toolbox elements to create
the model elements you need. Enter the actor and use case
descriptions by clicking on the element and typing the text into
the documentation field.
There is a reasonable on-line help facility available by
Use Case Modeling
As we discussed in class (see the lecture
notes), use case modeling is a common requirements analysis activity
and use case diagrams are a common requirements artifact. Open the
following use case diagram, found in the Model Explorer under
This is a more detailed use case model of the high-level "Play
Monopoly" use case. It focuses on actually playing Monopoly. Before
you do the exercise, make sure that you understand the following
- Text use case - Read through the use case I wrote for
the "Buy House" use case. This is the content and the format that you
should use in the exercise.
- <<extend>> - What does it mean for the
"Pass GO" use case to extend the "Make Move" use case?
- <<include>> - What does it mean for the
"Make Move" and "Pay Rent" use cases to include the "Roll Dice" use
case? Note that I’ve modeled a subtlety in the rules of
Monopoly that not everyone uses.
- Order - What is the order of execution of the use
cases that are performed by the "Player" (i.e., "Make Move", "Pay
Rent", "Buy House", "Draw Card")?
Extend the Monopoly use case model in the following ways:
- Add use case ovals to the appropriate diagram for the
following use cases:
- Login - The player must login before playing
monopoly or viewing statistics.
- Trade Properties - At the beginning of their turn,
a player may ask another player to trade properties and/or money.
- Go to Jail - A player who lands on the "go to Jail"
space or draws a "go to jail" card must move to the jail space.
- Buy Property - At the end of their turn, a player
may choose to buy the property they have just landed on.
Write a full text use case for the "Buy Property" use
case you just added to the diagram. Remember to write the main
scenario as a "success" scenario and add other conditions as
extensions. See my "Buy House" as an example. Also, don’t
forget that the property could be owned either by the bank or by
Make sure that your diagram employs UML use case elements in the
manner promoted in the analysis lecture
and that you save the full model for use in next week’s lab.
Use Case Modeling for your Team Project
This week, your team will do a preliminary use case analysis for
your team project. Note:
- Prepare for this session - Review your
vision statement and the comments you received on it; that will be
the basis for your use case modeling.
- Understand the customer’s domain and
current practice - Here are some good questions to ask of the
- What are the basic types of actors involved in their work?
- What are the typical tasks that they currently perform?
- What are the key domain objects that they work with?
- What software/manual systems do the currently use if any?
- Create a model - Draw or construct a use
case model - A photographed whiteboard or scanned sheet of paper is
perfectly fine here.
- Plan for the next week - Make plans for who
will do what during the next week.
Remember these mantras:
- Don't “over” model - Use the simplest
parts of the UML use case diagramming formalism and try to focus on
the users rather than system developers.
- Don't “future-proof” - It's unlikely that
you can build a model that anticipates every possible future
variation, so don't even try. Focus on the most important and/or most
risky parts of the system.
- Don't “petrify” your models - These models
are not set in stone; they will live and breath throughout the life
of the project.
You should actively participate in your team's use-case
modeling session. Your attendance will contribute to your lab score.
Submit the files specified above in Moodle under lab 4. We will grade your work
according to the following criteria:
- 60% - Exercise 4.1 - Complete the UML model as specified.
Submit the result in Moodle, either as an image or a StarUML file.
- 40% - Exercise 4.2 - Attend and contribute to your team
Back to the top
¹ Adapted from examples by Laurie Williams, Craig
Larman and Barbara Lerner.