CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.

Slides:



Advertisements
Similar presentations
Chapter 4: Requirements Engineering
Advertisements

Use-Cases.
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Use Case Diagrams Damian Gordon.
Use Case & Use Case Diagram
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Model. C-S 5462 Use case model describes what the user expects the system to do –functional requirements may describe only the functionalities.
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
USE CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
Extending the Requirements Model - techniques for detailing use cases
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Ch 12: Object-Oriented Analysis
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Lecture 8 Electronic Commerce Modelling Techniques
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Interaction Diagrams Activity Diagram State Machine Diagram
Object Oriented Analysis Process
Use Case Diagram.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Use Cases 2 ENGR ♯10 Peter Andreae
Rational Unified Process (Part 1) CS3300 Fall 2015.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
Object-Oriented Modeling
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
Faculty of Computer & Information Software Engineering Third year
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Faculty of Computer & Information
1 Structuring Systems Requirements Use Case Description and Diagrams.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Unit 3 Functional Requirements. Syllabus Introduction Features and usecases Use case Scenarios Documenting use cases Levels of details SRS Document.
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Understanding Requirements
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
Lecture Outline Monday 23 rd February (Week 4) 3 – 3:10pm Review of Requirements Eng. and use cases 3:10 – 3:40pm Exercise on Use Case 3:40-4:40 Class.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
1 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Case Study and Use Cases for Case Study Lecture # 28.
Using Use Case Diagrams
Paul Ammann & Jeff Offutt
Use Case Modeling - II Lecture # 27.
Storyboarding and Game Design SBG, MBG620 Full Sail University
Dynamic Modeling of Banking System Case Study - I
Use Case Model.
Object-Oriented Static Modeling of the Banking System - I
Use Case Model Use case diagram.
Exercices & Corrections Week 3
Use Case Modeling - techniques for detailing use cases
Concepts, Specifications, and Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Paul Ammann & Jeff Offutt
Use Cases & Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Real-Time Structured Analysis and Design Technique (RSTAD)
Presentation transcript:

CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams

Recap of Lecture 31 Introduction to modelling UML Evolution Different views of a system Different modelling diagrams

Outline of Lecture 32 UML Use case diagram Class diagram

Use Case Diagram It allows to describe the possible usage scenarios (use cases) that a system is developed for It expresses what a system should do However, does not address any realization details such as data structures, algorithms, etc. Use cases represent the customer’s requirements of the system

Use case diagram What is being described? (The system.) Who interacts with the system? (The actors.) What can the actors do? (The use cases.)

Use Cases A use case describes functionality expected from the system to be developed a use case is triggered either by invocation of an actor or by a trigger event, in short, a trigger A use case is usually represented as an ellipse.

System The set of all use cases together describes the functionality that a software system provides Query student data Issue certificate Announce Exam Student Administration system

Actors It is essential to document who actually works and interacts with the system Actors always interact with the system in the context of their use cases Actors are represented by stick figures

Example

Type of Actors Human/non-human Active/passive Primary/ Secondary

Example Active vs. Passive Active vs. Active Primary vs. Secondary Human Non-Human

Associations An actor is connected with the use cases via associations It express that the actor communicates with the system and uses a certain functionality An association is always binary Multiplicities may be specified for the association ends.

Association: Example

Role Actors do not represent a specific user They represent roles that users adopt Specific users can adopt and set aside multiple roles simultaneously Example: Student vs. TA

Relationships between Actors Actors often have common properties and some use cases can be used by various actors

A word of caution Generalization: actors that are specialized versions of other actors

Relationships between Use Cases «include» relationships use cases that are included as parts of other use cases. Enable to factor common behavior. «extend» relationships use cases that extend the behavior of other core use cases. Enable to factor variants. generalizations of use cases use cases that are specialized versions of other use cases

Example Base use case Included use case Extending use case Base use case

Condition

Example

How to identify actor and use case? Analysis of requirements documents Analysis of the expectations of future users What are tasks of each actor ? Will any actor create, store, change, remove, or read information in the system ? What use cases will create, store, change, remove, or read this information ? Will any actor need to inform the system about sudden, external changes ? Does any actor need to be informed about certain occurrences in the system ? Can all functional requirements be performed by the use cases ?

Pitfalls Error 1: Modeling processes Error 2: Setting system boundaries incorrectly Error 3: Mixing abstraction levels Error 4: Functional decomposition Error 5: Incorrect associations Error 6: Modeling redundant use cases

Use case description

An example Use Case: Withdraw Money Purpose: To withdraw some cash from user’s bank account Overview: The use case starts when the customer inserts his credit card into the system. The system requests the user PIN. The system validates the PIN. If the validation succeeded, the customer can choose the withdraw operation else alternative 1 – validation failure is executed. The customer enters the amount of cash to withdraw. The system checks the amount of cash in the user account, its credit limit. If the withdraw amount in the range between the current amount + credit limit the system dispense the cash and prints a withdraw receipt, else alternative 2 – amount exceeded is executed.

Use case: Money withdrawal Actors: Customer Pre Condition: The ATM must be in a state ready to accept transactions The ATM must have at least some cash on hand that it can dispense The ATM must have enough paper to print a receipt for at least one transaction Post Condition: The current amount of cash in the user account is the amount before the withdraw minus the withdraw amount A receipt was printed on the withdraw amount The withdraw transaction was audit in the System log file

Use case: Money withdrawal Actor ActionsSystem Actions 1. Begins when a Customer arrives at ATM 2. Customer inserts a Credit card into ATM 3. System verifies the customer ID and status 5. Customer chooses “Withdraw” operation 4. System asks for an operation type 7. Customer enters the cash amount6. System asks for the withdraw amount 8. System checks if withdraw amount is legal 9. System dispenses the cash 10. System deduces the withdraw amount from account 11. System prints a receipt 13. Customer takes the cash and the receipt 12. System ejects the cash card

Use case: Money withdrawal Alternative flow of events: Step 3: Customer authorization failed. Display an error message, cancel the transaction and eject the card. Step 8: Customer has insufficient funds in its account. Display an error message, and go to step 6. Step 8: Customer exceeds its legal amount. Display an error message, and go to step 6. Exceptional flow of events: Power failure in the process of the transaction before step 9, cancel the transaction and eject the card

Use case: Money withdrawal Alternative flow of events: Step 3: Customer authorization failed. Display an error message, cancel the transaction and eject the card. Step 8: Customer has insufficient funds in its account. Display an error message, and go to step 6. Step 8: Customer exceeds its legal amount. Display an error message, and go to step 6. Exceptional flow of events: Power failure in the process of the transaction before step 9, cancel the transaction and eject the card

ATM Cash withdrawal

Class Diagram Use the class diagram to model the static structure of a system Describes the elements of the system and the relationships between them Class diagram allows to create a conceptual view of the system and to define the vocabulary to be used

Essential features Class Attributes Operations Relationships Associations Generalization Realization Dependency Constraint Rules and Notes

Class Describes a set of objects having similar: Attributes (status) Operations (behavior) Relationships with other classes Attributes and operations may have their visibility marked: "+" for public "#" for protected "−" for private "~" for package

Example Class Name Attributes Operations

Thank you Next Lecture: UML Diagrams