Use Case Diagrams
|1.0||Background on UML, Eclipse UML, and Use Case Diagrams|
|2.0||Creating an Use Case Diagram|
|3.0||Creating Objects in an Use Case Diagram|
|4.0||Tips and Tricks|
UML (Unified Modeling Language) was developed by Grady Booch, James Rumbaugh, and Ivar Jacobson, at Rational Software Corporation in 1997, for a standard way to model the structure of large applications. The UML is a standard maintained by the Object Management Group (OMG). The current version of UML is 2.0. UML provides a standardized way of modeling software, so the everyone can understand a given model. UML has several different modeling types: class diagram, sequence diagrams, state charts, and use cases to name a few. This tutorial will introduce programmers to creating class diagrams in Eclipse UML.
Eclipse UML is an Eclipse plug-in developed my Omondo. There is a free edition and a studio edition of Eclipse UML. The free edition will cover the modeling needs for CSC 326. You can download Eclipse UML here. After you have downloaded Eclipse UML, double click the jar file, which will then run an installer program. This will install Eclipse UML as a plug-in. We are using Eclipse UML release 184.108.40.20650718. You need to have the Eclipse Modeling Framework (EMF), Graphical Editor Framework (GEF) and UML2 Eclipse plug-ins installed. These are all Eclipse projects, and you can install them by connecting to the Eclipse update site inside of Eclipse (see Installing Plugins in Eclipse tutorial)
Use Case Diagrams
A use case is a functionality the users need from the system. A use case diagram depicts the relationships among the actors and use cases. It is usually used for requirements analysis. The components in a use case diagram include:
There are also two kinds of relationships between use cases:
For more detailed information about Class Diagrams, check out Chapter 9 in Martin Fowler's UML Distilled.
Since Use Case diagrams model a system's requirements, use cases are not tied to the code in a project.
The use case diagram file is stored in the source directory or package of the associated source code. You can also create use case diagrams in another folder of the project.
2.1 There are three ways to create a use case diagram:
2.2 Press Next. Give the use case diagram a file name. All use case diagrams end in a .uud extension.
Below are the icons on the use case diagram tool bar. These are displayed at the top of the Use Case Diagram editor window. A discussion of each of the tools is also below.
To add one of these components to a diagram, select the component and drag the curser from a starting point to an ending point in the editor. When you are creating an use case or actor, you will need to drag a rectangle of the size you want the use case or actor to be in the diagram. The connector icons will need to be dragged from a source object to a destination object.
Creating a Use Case
When you create a use case, you have the ability to enter more information about the use case than just the name. This will allow you to keep your requirements accessible from your code, so that you may reference them when you have any questions. You can store pre conditions, post conditions, rank, normal flow, alternative flow, and the use case description as meta-data of the use case.
4.1 If you wish to see more of your use case diagram you can zoom out using the zoom feature located in the toolbar.
Import the CoffeeMaker project into your workspace. Create a use case diagram in that models the requirements of the system. The CoffeeMaker requirements and a sample use case diagram may be found here.
Show your use case diagram to your TA for credit.
Back to Software Engineering Tutorials