UML Use Case Diagram Basics

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What represents the boundary of a system on a use case diagram?

  • A box around all use cases (correct)
  • A circle encapsulating the actors
  • A shaded area indicating system environment
  • A dashed line around the use cases

How is an association between an actor and a use case represented in a diagram?

  • By a dotted line
  • By a dashed arrow
  • By a solid line (correct)
  • By a thick line

What is the common practice for reading use case diagrams?

  • From right to left
  • From left to right (correct)
  • From top to bottom
  • From bottom to top

What do directional arrows on association lines indicate?

<p>Who initiates communication (B)</p> Signup and view all the answers

What is the purpose of a stereotype in UML diagrams?

<p>To modify the meaning of an element (D)</p> Signup and view all the answers

How can a stereotype be visually represented in a UML diagram?

<p>Displayed using double angle brackets (B)</p> Signup and view all the answers

What is a primary purpose of a use case in project management?

<p>To define the scope of the project (C)</p> Signup and view all the answers

How is a use case represented in UML?

<p>As an ellipse containing the name of the use case (A)</p> Signup and view all the answers

What does the stick-figure actor symbol represent in UML?

<p>An actor interacting with the system (A)</p> Signup and view all the answers

What is typically not included in the use case diagram regarding use cases?

<p>Step-by-step actions of use cases (B)</p> Signup and view all the answers

What does an actor represent in a use case diagram?

<p>A role played by a user or an external entity (C)</p> Signup and view all the answers

What is indicated by a box surrounding a use case in a diagram?

<p>It shows the use case is part of a system (D)</p> Signup and view all the answers

Which of the following best describes the purpose of modeling a use case?

<p>To facilitate the construction of tests for the system (A)</p> Signup and view all the answers

What additional detail can be provided in a use case notation?

<p>Multiple compartments for expanded details (D)</p> Signup and view all the answers

Which statement is true regarding actors in a use case?

<p>An actor can trigger multiple use cases (B)</p> Signup and view all the answers

How can an actor be visually represented other than as a stick figure?

<p>Using user-defined icons (D)</p> Signup and view all the answers

What is the purpose of a use case specification?

<p>To serve as a detailed narrative description of a use case. (C)</p> Signup and view all the answers

Which element is NOT a standard part of a use case specification?

<p>Implementation plan (D)</p> Signup and view all the answers

According to Martin Fowler, how should use case descriptions be approached?

<p>They can vary in format depending on the use case needs. (C)</p> Signup and view all the answers

What does the 'main flow' section of a use case specification describe?

<p>The normal execution steps of the use case. (D)</p> Signup and view all the answers

What is scenario #5 about in the context of ATM transactions?

<p>The ATM not having enough cash or exceeding withdrawal limits (D)</p> Signup and view all the answers

What is described under the 'preconditions' section of a use case?

<p>Conditions that must be true before executing the use case. (C)</p> Signup and view all the answers

Which scenario describes the situation when a bank card is stuck in the ATM?

<p>Scenario #6 (B)</p> Signup and view all the answers

In use case specifications, what does 'trigger' refer to?

<p>Events that cause the use case to start. (D)</p> Signup and view all the answers

Which statement about use case alternatives is accurate?

<p>They detail potential deviations from the main flow. (A)</p> Signup and view all the answers

What does the asterisk (*) signify in the context of the alternative scenarios?

<p>A scenario that could happen at any step of the process (B)</p> Signup and view all the answers

What can be found in the post conditions section of a use case specification?

<p>System state resulting from a successful execution. (B)</p> Signup and view all the answers

What is the main benefit of writing user requirements as use case specifications?

<p>It helps organize and clarify the system’s objectives (A)</p> Signup and view all the answers

Which scenario outlines the occurrence when cash becomes stuck in the ATM?

<p>Scenario #8 (D)</p> Signup and view all the answers

What is one characteristic of scenario #9?

<p>It describes the failure to retrieve cash from the ATM (A)</p> Signup and view all the answers

How many alternative scenarios or paths are at least highlighted in the discussion?

<p>Eleven (A)</p> Signup and view all the answers

What action should be taken to clarify software functions in the building use case process?

<p>Write the software functions in plain English (B)</p> Signup and view all the answers

What primary purpose do use cases serve in a system analysis?

<p>To express user requirements (B)</p> Signup and view all the answers

What components typically make up a use case?

<p>Use case diagram and use case specification (D)</p> Signup and view all the answers

Which of the following describes a key difference between a requirement and a use case?

<p>A use case focuses on the goal, while a requirement focuses on processes. (A)</p> Signup and view all the answers

What is depicted in a use case diagram for an ATM system?

<p>The main screen and menu options available (C)</p> Signup and view all the answers

What advantage does understanding the 'why' of a feature provide in system design?

<p>It opens opportunities for innovative solutions (D)</p> Signup and view all the answers

How do use case specifications facilitate the development of other models?

<p>They provide a basis for generating process models and data models. (C)</p> Signup and view all the answers

Which of the following options is NOT typically included in a use case description?

<p>Technical specifications of system design (D)</p> Signup and view all the answers

Which interactions might be documented in a use case for an ATM system?

<p>Withdraw, deposit, inquire balance, and transfer funds (B)</p> Signup and view all the answers

What is the first step in building use cases?

<p>Identify and name your use cases from the narrations. (D)</p> Signup and view all the answers

What should be included in the main flow of a use case?

<p>A dialog between the system and the actors. (B)</p> Signup and view all the answers

What defines the preconditions in a use case?

<p>Conditions true before the flow of events begins. (A)</p> Signup and view all the answers

Why might a use case need to be divided into smaller use cases?

<p>If it cannot be summarized in one sentence. (A)</p> Signup and view all the answers

What should be done after defining the main flow of a use case?

<p>Identify pre-conditions and post-conditions. (B)</p> Signup and view all the answers

What is the purpose of identifying alternative paths in a use case?

<p>To prepare for possible errors and exceptions. (B)</p> Signup and view all the answers

What is an important characteristic of well-defined use cases?

<p>Their goals can be expressed clearly in one sentence. (A)</p> Signup and view all the answers

What is suggested to do if several use cases share similar flows?

<p>Move them out for re-use as include or extended use cases. (D)</p> Signup and view all the answers

Flashcards

What is a Use Case?

A technique for expressing user requirements during the analysis phase. It illustrates how a system interacts with its environment by showing user activities and the system's responses.

Use Case Diagram

A visual representation of a use case, showing actors interacting with the system and the system's functionalities.

Use Case Description (Specification)

A detailed description of a use case, outlining steps, scenarios, and alternative flows. It explains how users interact with the system to achieve a specific goal.

Actors

Entities outside the system that interact with the system, such as users or other systems.

Signup and view all the flashcards

Use Case

A unit of functionality within a system, representing a specific user goal.

Signup and view all the flashcards

User Goal

Describing a use case from the user's perspective, focusing on the actions performed and expected outcomes.

Signup and view all the flashcards

Process-Oriented Approach

Focusing on the process itself, which often leads to reproducing existing systems instead of innovative solutions.

Signup and view all the flashcards

Goal-Oriented Approach

Focusing on the user's goal and the underlying reasons for a process, leading to flexible and innovative solutions.

Signup and view all the flashcards

System Boundary

A boundary drawn around all use cases on a use case diagram, excluding actors. It helps define the system's scope and responsibilities.

Signup and view all the flashcards

Association

A line connecting an actor to a use case, representing their interaction. It shows how the actor initiates the use case and receives its results.

Signup and view all the flashcards

Stereotype

An extension to UML notations that modifies the meaning of an element and describes its role within a model. It helps clarify the element's function.

Signup and view all the flashcards

Actor Stereotype

A common stereotype for actors in use case diagrams, denoted by a stick-figure icon. It represents a role or type of user interacting with the system.

Signup and view all the flashcards

Named Stereotype

A type of stereotype used to label an actor with a role name, representing a specific responsibility or function the actor fulfills within the system.

Signup and view all the flashcards

Use Case Notation

The use case is displayed as an ellipse, representing a specific functionality.

Signup and view all the flashcards

System Boundary Notation

A use case is placed within a box representing the system where it belongs.

Signup and view all the flashcards

Communication Line

A line or arrow connecting an actor to a use case, indicating communication or interaction.

Signup and view all the flashcards

Importance of Good Use Cases

It helps you identify missing requirements, track progress, and test your system effectively.

Signup and view all the flashcards

Use Case Description

A detailed, structured description of a use case, outlining steps, scenarios, and alternative flows. It explains how users interact with the system to achieve a specific goal.

Signup and view all the flashcards

Use Case Name

The name that identifies a use case and clearly describes its purpose.

Signup and view all the flashcards

Use Case Summary Description

A brief description of the use case, outlining its goal and importance within the system.

Signup and view all the flashcards

Pre-conditions

Conditions that must be true before a use case can start. Like prerequisites or requirements.

Signup and view all the flashcards

Trigger

Events that trigger the execution of the use case.

Signup and view all the flashcards

Main Flow

The normal and expected steps involved in a use case, outlining the interaction between the user and the system.

Signup and view all the flashcards

Alternative Flow

Alternative scenarios that could occur during a use case, including exceptions, errors, or user choices.

Signup and view all the flashcards

Post Conditions

The state of the system after the use case completes, including successful and failed scenarios.

Signup and view all the flashcards

ATM Cash Availability Scenario

A scenario that occurs if the ATM doesn't have enough cash, the requested amount exceeds the withdraw limit, or the requested amount exceeds the account balance.

Signup and view all the flashcards

Card Stuck Scenario

A scenario where the bank card gets stuck in the ATM during a transaction.

Signup and view all the flashcards

Customer Forgets Card Scenario

A scenario where the customer forgets to retrieve their bank card after a transaction.

Signup and view all the flashcards

Cash Stuck Scenario

A scenario where the dispensed cash gets stuck in the ATM machine.

Signup and view all the flashcards

Customer Forgets Cash Scenario

A scenario where the customer forgets to take their cash after a transaction.

Signup and view all the flashcards

Stolen Card Scenario

A scenario where the bank card is reported stolen or lost.

Signup and view all the flashcards

Incorrect PIN Scenario

A scenario where the user enters a wrong PIN number during the ATM transaction.

Signup and view all the flashcards

Alternative Scenario (*a or *b)

An alternative path or scenario that can occur at any step within a use case.

Signup and view all the flashcards

Triggering Actor

The primary user or external entity who initiates a use case. They trigger the interaction with the system.

Signup and view all the flashcards

Receiving Actor

The entity that receives the result of a use case. It may be the system itself or another actor.

Signup and view all the flashcards

Include Use Cases

Re-usable parts of use cases that represent common actions or sequences of steps.

Signup and view all the flashcards

Study Notes

Systems Analysis and Design - Chapter 4: Use Case

  • Use cases are a way to express user requirements.
  • Use cases are extensively used in the analysis phase.
  • A use case shows how a system interacts with its environment, by highlighting user activities and system responses.
  • A use case usually comprises a use case diagram and a use case specification/description (narrative).
  • Use case specifications are easy for users to understand.
  • They easily translate into process models, data models, and various UML diagrams (like activity diagrams, sequence diagrams, etc).
  • A significant part of a system analyst's job is to differentiate between what constitutes a use case and what does not.

What is a Use Case?

  • Use cases are descriptions of how a user interacts with a system to achieve a specific goal.
  • Use cases highlight all the steps involved in the process.
  • They include the actions of both the user and the system.

Use Case Diagram and Use Case Specification (ATM System)

  • Use Case Name: Withdraw Money
  • Summary: Allows bank clients to withdraw cash from their bank account.
  • Description: The use case details how a client obtains cash from an ATM.
  • Preconditions: The ATM is connected to the network, has available cash, and the client's account exists.
  • Post Conditions/Guarantee: On success, the client receives cash and the account is debited; on failure, the account remains intact.
  • Actors: Bank Client, Banking System
  • Trigger: User inserts debit card, enters PIN, and chooses "Withdraw".
  • Main Flow: ATM processes card, requests PIN, validates client, displays options, client selects amount, ATM checks balance, ATM issues cash.
  • Extensions: Invalid card, card stuck, insufficient funds, withdrawal limit exceeded.

ATM System Use Case Diagram

  • The diagram shows how users interact with an ATM application.
  • It depicts the main screen and menu options the user sees.

ATM System Use Case Diagram

  • The system offers options like withdraw, deposit, checking balance, and transferring funds.
  • Each action is its separate use case.
  • The use case description outlines the different scenarios.
  • Associated with each use case, is the customer (outside the system).

Difference between a Requirement and a Use Case

  • A simple requirement describes a process, whereas a use case focuses on the goal or intended outcome.
  • Focusing only on the "how" of a process often leads to reproducing existing systems instead of designing a new system.
  • Emphasizing the "why" behind a feature promotes the consideration of technology advances, leading to more effective solutions.
  • An example of this is that if a user needs a notification that they don't have enough balance, the system should have the freedom to use a beep, alert, or a voice message to notify the client.

Importance of a Good Use Case

  • Defining project scope.
  • Revealing missing requirements.
  • Facilitating project management.
  • Assigning tasks to teams/individuals for modeling, design, or implementation.
  • Tracking project progress via delivered use cases building tests for the system.

Use Case Diagram Notations

  • A use case is represented as an ellipse (oval) containing the use case name.
  • The outside world (actors) interacting with the use case is shown by a line/arrow from the actor to the use case.
  • The ATM system is a box containing all of the use cases.

Detail About Each Notation (The Use Case)

  • A use case is represented by an ellipse combined with a short name (e.g. Withdraw Money).
  • If details are needed, use a rectangle with an oval representing the use case in the top right corner, placing the use case's name boldly above.
  • Create compartments as needed.

Detail About Each Notation (Actor)

  • An actor doesn't have to be a human; it can be another system or part of the system outside the use case.
  • The actor can be a role (e.g., client), or entity (e.g., database system).
  • An actor is represented by a stick figure with a short descriptive name (e.g., Client).

Detail About Each Notation (Actor) (cont.)

  • Actors can be user-defined icons (e.g., Database server as a physical or virtual object).
  • An actor can interact with one or more use cases and one use case can interact with one or more actors.

Detail About Each Notation (The System)

  • Draw a box around use cases to show the system's boundary.
  • Name the box after the system.
  • This helps determine scope and responsibility in system design.

Detail About Each Notation (Association)

  • The association between an actor and a use case is a solid line.
  • Typically, read use case diagrams from left to right, with actors initiating use cases on the left and receiving results on the right.
  • For improved readability, group actors differently if needed.
  • Arrows (though not always UML standard) on association lines visually show who initiates a communication.

Stereotype

  • UML provides extensions called stereotypes to modify element meanings within a model.
  • Stereotypes have associated icons for elements (like the stick figure actor).
  • In cases where the actor is represented by name only, you can see double angle brackets e.g <actor>.
  • There's no limit to the number of stereotypes that an element can have.

Generalization

  • Generalization is another name for object-oriented inheritance.
  • Actors and use cases can be generalized.
  • Common requirements can be extracted from several actors into a generic actor.
  • For instance, bank clients (regular, business, VIP) share functionality and specialized tasks.

Generalization (cont.)

  • Generalization is shown with a solid line and a closed arrow pointing to the parent.

Include

  • If several use cases share functionalities, create one shared, included use case.
  • This is similar to calling a function or operation in programming.
  • The included use case does the required task, and the triggering use case encapsulates it.

Include (cont.)

  • The included use case is not self-contained but a part of a larger use case.

Extend

  • A base use case can have additional functionalities that are added if certain conditions are met.
  • For instance, if a withdrawal amount exceeds a limit, an error message will be displayed via an 'extend' use case.
  • This 'extend' use case can be used again elsewhere if necessary.

Extend (cont.)

  • The extension use case is smaller in scope, and the extended use case is dependent on the condition of the extension.

Look at the full final version of our diagram and read it

  • The client interacts with distinct bank clients (regular, business, or VIP).
  • All clients can initiate a withdrawal or deposit money.
  • Deposit methods include cash or check.
  • Both withdrawal and deposit invoke the Update Account use case.
  • Displaying an error message should happen for situations like a failed withdrawal or deposit, exceeding limits, or other problems.

Guidelines for Building a Quality Use Case Diagram

  • Use strong verbs for use case names (e.g., Withdraw Money, Display Error).
  • Use domain terminology when naming use cases (e.g., Get Money versus Withdraw Money).
  • Order use cases based on priority, timing, and size.
  • Place primary actors in the top-left corner.
  • Use singular, domain-relevant nouns for actors (e.g., "client" vs. "person").
  • Use <> to indicate system actors.
  • Avoid having actors interacting with each other.
  • Introduce a time actor for scheduled events.
  • Avoid including pointless system boundary boxes.
  • Do not use arrowheads on associations.

Guidelines for Building a Quality Use Case Diagram (cont.)

  • Place included use cases to the right and extensions below the base use case.
  • Place the inheriting use case below the base use case.
  • Place inheriting actors below the parent actor.

Use Case Description Elements (Use Case Specification)

  • Include a use case name, summary (the use case goal and its importance).
  • Describe preconditions (conditions that must be true before the use case starts).
  • Detail post-conditions and guarantees (what the system state will be after successful or failed executions).
  • List participating actors (those interacting with the use case).
  • Describe the trigger (events beginning a use case).
  • Detail the main flow (the typical sequence of events).
  • Include extension points (alternative scenarios).

Use Case Description Elements (Use Case Specification) (cont.)

  • Martin Fowler emphasizes flexible use case descriptions as there's no one standard.
  • Use case descriptions (like tables containing name, summary, actors, preconditions, trigger, main flow, post-conditions, and extensions) are the best way to document a use case.

Use Case Description Elements (Use Case Specification) (cont.)

  • Use case diagrams are good for showing the overview, but a formal narrative about events (success and failure of that use case) is essential for a comprehensive description.

Use Case Description Elements (Use Case Specification) (cont.)

  • The use case specification table contains (with their headers), Use Case Name, Summary, Description, Preconditions, Post conditions, Actors, Trigger, Main flow, Extensions
  • Use case names start with the use case description; then come the pre-conditions, actors, triggers, main flow, alternative flows), and post-conditions.

Use Case Description Elements (Use Case Specification) (cont.)

  • The use case description elements will start with the use case name, summary and description pre-conditions, guarantee, actors, trigger, main flow, followed by any extensions.

Use Case Specification Elements - Withdraw Money Use Case

  • This section describes the details for the Withdraw Money use case in an ATM system.
  • The detailed steps include user actions and system responses, along with the scenarios if these actions fail. This details includes success and failure of all the steps in the use case.

UML tool UMLet

  • Brief intro to free, open-source UML tool UMLet, showing its website and a demo video.

Introduction to the "UMLet" UML Tool

  • UMLet: free, open-source UML tool with simple user interface for fast UML diagram creation.
  • Create sequence, activity diagrams from text and export to formats like eps, pdf, jpg, svg, clipboard.
  • Integrate with Eclipse and create custom UML elements. Runs on various OS like Windows, OS X, and Linux.

Introduction to the "UMLet" UML Tool (Cont.)

  • Download the UMLet 15.0 stand-alone version, unzip the folder, and you are ready to go.

Introduction to "UMLet" UML Tool (Cont.)

  • Double-click an object in the library to create it in your diagram.
  • Properties tab on the right bottom lets you modify various object-related properties like name, background, or foreground color.
  • Modify and change the direction of arrows (generalization) using the 'Properties' tab.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

UML Use Case Diagrams and Descriptions
10 questions
UML Use Case Diagrams: Actors and Roles
1 questions
UML Use Case Diagrams Overview
40 questions
Use Quizgecko on...
Browser
Browser