Title: MIS 160 Systems Development Life Cycle I
1MIS 160Systems Development Life Cycle I
- Lecture 10
- Use-Case Diagrams
2The Use Case Diagram
- This diagram documents the functions of the
system. - It helps to
- Construct our view (developers view) of what the
users want, - Provide a starting point for discovering object
classes, - Provide a starting point for discovering some of
the operations or behaviors for the classes.
3The Use Case Diagram
- The diagram shows
- a typical interaction between a user and a
system - represents a particular scenario for the system
- Provides an external view of the system
- Not necessarily object-oriented
4The Use Case Diagram
- The users view of the system will consist of
- The commands they give it, and
- The responses they get back from it.
- The users see the system as a black box.
- We write down in step-by-step form the steps a
user takes to do a task with the help of our
software system. - We document the users concept of the steps a
user would follow or does follow interacting with
the system to get a job done.
5The Use Case Diagram
- Use Case Diagrams are an informal description of
the system - They do not give information about how the system
does things - Or any other details internal to the system.
- They just tell us what the system will do for the
users. - Concentrating on what rather than how makes them
more a tool for analysis than design, but. - They do give us a good starting point for both
- Testing the system, and
- Prototyping the user interface.
6How Are Use-Cases Created?
- Two steps
- Write text-based case descriptions
- Translate descriptions into diagrams
- Describes one and only one function, but may have
multiple paths. - Developed working with users for content.
7Use Case Flow
- Has three main components
- Actor (initiator)
- System (replies to the initiator)
- Communication flow/ Relationships (all that
happens once the actor initiates the action and
the system responds to that impulse) - ltltincludesgtgt a chunk of common behavior which
directly involves another use case - ltltextendsgtgt exceptions to the normal course of
action - Both ltltincludesgtgt and ltltextendsgtgt use a dotted
line rather than a solid line
8A Simple Use Case Diagram
9The Use Case Model
- Actors are diagrammed as stick figures.
Use cases are initially drawn as an ellipse with
the name of the Use Case inside.
Get Information
A connecting line shows which actor participates
in the use case and any special relationships
that might exist.
10Constructing a Use Case
- 1. Identify the actors
- 2. Identify use cases
- 3. Write use case descriptions (templates)
- 4. Look for common scenarios (includes)
- 5. Look for exceptions (extends)
- 6. Group similar courses of events into use case
diagrams
11Actors
- An Actor is a person, an organization or another
system that can initiate an instance of a use
case - makes use of one or more features of the system.
- a role that a user plays with respect to the
system - outside the system boundaries
- not the same as an individual user
- The goal is to define the major ways in which the
Actors could interact with the system - Use the persons title, rather than their name.
12Finding Actors
- From the Context Diagram.
- Some of the External Entities will turn out to be
Actors - End-Users are also Actors - every time they touch
the mouse or keyboard. - An Actor may represent several people
- e.g., a Sales Clerk actor includes several
people, including the Manager. - A person may sometimes act as different Actors
- e.g., the Manager person is sometimes a Sales
Clerk Actor - Thus an Actor is a role a person assumes when
they interact with the system.
13Use Case
- Definition
- A Use Case represents the steps a user could
follow to make use of the system. - A Use Case represents a scenario of what might
happen when a user (i.e., an Actor) makes use of
one or more features of the system. - So a Use Case is in a way a case of the usage
of the system.
14Creating Use Cases
- Ask the users to list everything they need the
system to do for them. - This list is a first pass only. Do not expect it
to be anywhere near complete. - Show the system as a large box,
- Draw around it all the Actors you have discovered
so far. - Draw the ellipses and write in the names of the
Use Cases. - Join with arrows. The arrows show the net flow
of data between the Actor and the system.
15Use Cases
- Once you have names for the Use Cases, its time
to spell them out in detail. There are 2 main
steps to this process - Validate the name.
- Write a narrative description.
16Validate the Name
- Certain words have different meaning for
different countries, cultures, or corporations.
Be sure you and the users are all attaching the
same meaning to each name. - Refining the name often shows that there are
really two or more Use Cases where before we saw
only one. - e.g., Register Student may resolve into
different steps for Full-time, Part-time and
Special students.
17Validate the Name
- Go down the list and ask the users
- Does the name tell all it should?
- Does it tell the whole story?
- Are there any exceptions?
- Special cases?
- Possible errors?
- Occasional variations?
- Does the name cover several related or similar
processes? - Can you find a more enlightening or informative
name?
18Use-Case Descriptions (Templates)
- Describe basic functions of the system
- What the user can do
- How the system responds
- Use cases are building blocks for continued
design activities.
19The Use Case Description (Template)
- A Narrative Description
- Get the users to describe a course of events
that happens as they do the task. - Include every step. Dont miss any.
- Speak as if you were training an assistant to do
a job, and you want the job done right. - Tape or write the steps exactly as described.
20The Use Case Diagram
- Remember, users do not request a Use Case by
name! - The Use Case is our invention for us to do our
job. - Typically, a user begins to use the system,
- this starts a course of events,
- that results in the user acting out a Use Case.
- The resulting historical record of what this user
actually did is an instance of the Use Case.
21Elements of a Use-Case Description
22Two Use Case Scenarios for Create New Order
23Use Case Description (Template)
- Use Case Name
- Actors
- Purpose/goal
- Description (scenario)
- Alternative (extends)
- Includes
24A Simple Use Case Model
Sales and Marketing System
Change Name and Address
Make a Sale
Create Customer
Sales Clerk
Check Stock Levels
Check Credit Rating
Manager
Return Goods
Set Bonus for Staff
25The Use-Case Diagram for Appointment System
26Use-Case Diagram with Specialized Actor
27Extend and Include Relationships