UML Use Case Diagram Basics
48 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

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</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</p> Signup and view all the answers

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

    <p>Displayed using double angle brackets</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</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</p> Signup and view all the answers

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

    <p>An actor interacting with the system</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</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</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</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</p> Signup and view all the answers

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

    <p>Multiple compartments for expanded details</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</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</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.</p> Signup and view all the answers

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

    <p>Implementation plan</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.</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.</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</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.</p> Signup and view all the answers

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

    <p>Scenario #6</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.</p> Signup and view all the answers

    Which statement about use case alternatives is accurate?

    <p>They detail potential deviations from the main flow.</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</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.</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</p> Signup and view all the answers

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

    <p>Scenario #8</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</p> Signup and view all the answers

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

    <p>Eleven</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</p> Signup and view all the answers

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

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

    What components typically make up a use case?

    <p>Use case diagram and use case specification</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.</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</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</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.</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</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</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.</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.</p> Signup and view all the answers

    What defines the preconditions in a use case?

    <p>Conditions true before the flow of events begins.</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.</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.</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.</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.</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.</p> Signup and view all the answers

    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

    Description

    Test your knowledge on use case diagrams in UML with this quiz. Explore concepts such as associations, actors, stereotypes, and the purpose of use cases in project management. Understand how to read and represent various elements in UML diagrams effectively.

    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