1 / 34

Requirements Modelling with Use Cases

Requirements Modelling with Use Cases. IP Internet of Things Dr Adil Al-Yasiri. Outline. What is Requirements. Functional vs. Non Functional Requirements. Requirements and UML Use case basics Use case model Use case diagrams Use case description Use case relationships.

chapa
Télécharger la présentation

Requirements Modelling with Use Cases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Requirements Modelling with Use Cases IP Internet of Things Dr Adil Al-Yasiri IoT – Requirements and Use Cases

  2. Outline • What is Requirements. • Functional vs. Non Functional Requirements. • Requirements and UML • Use case basics • Use case model • Use case diagrams • Use case description • Use case relationships. IoT – Requirements and Use Cases

  3. A statement of a system service or constraint A software capability needed by the user to solve a problem to achieve an objective It may range from a high-level abstract statement of a service or of a system constraint to a detailed mathematical functional specification What is a requirement? IoT – Requirements and Use Cases

  4. High Level Requirements Definition 1- The system shall provide a means of representing and accessing external files. Detailed Requirements Specification 1.1- The system shall provide facilities to define the type of external files. 1.2- External file types shall be associated with a tool which may be used to view the file. 1.3- External file types shall be represented by a specific icon. 1.4- The system shall provide the user a means that allows the user to define the icons used to represent external files. 1.5- The system shall allow the user to apply the tool associated with an external file type by simply selecting the icon representing the external file. Requirements Structure IoT – Requirements and Use Cases

  5. Functional requirements Statements of services the system should provide, Non-functional requirements Constraints on the services or functions offered by the system such as timing constraints Domain requirements Requirements that come from the application domain of the system and that reflect characteristics of that domain Types of Requirements IoT – Requirements and Use Cases

  6. Describe functionality or system services Examples: The user shall be able to search either all of the initial set of databases (defined in document X) or select a subset from it. The system shall provide multiple viewers for the user to read documents in the document store. Every order shall be allocated a unique identifier (ORDER_ID). Functional requirements IoT – Requirements and Use Cases

  7. Non-functional requirements define the overall qualities or attributes of the resulting system Non-functional requirements place restrictions on the product being developed. Examples of NFR The system shall ensure that data is protected from unauthorised access. The system shall have availability of 99.9% within operating conditions specified in standard X. The order processing service shall process 8 transaction per second or more. Non-functional requirements (NFR) IoT – Requirements and Use Cases

  8. The ‘IEEE-std830 - 1993’ lists 13 types of non-functional requirement to be included in a Software Requirements Document. Performance requirements Interface requirements Operational requirements Resource requirements Verification requirements Acceptance requirements Types of Non-functional requirements IoT – Requirements and Use Cases

  9. Documentation requirements Security requirements Portability requirements Quality requirements Reliability requirements Maintainability requirements Safety requirements Types of NFRs (contd.) IoT – Requirements and Use Cases

  10. UML uses use cases to provide a way to capture requirements includes textual description as well as sets of diagrams may include other models, such as activity diagrams and sequence diagrams. UML Requirements Model IoT – Requirements and Use Cases

  11. A use case Describes sequences of actions a system performs that yield an observable result of value to a particular actor. Stories of using a system A technique to understand and describe functional requirements Use case template: documenting use cases Use Case Basics IoT – Requirements and Use Cases

  12. Use Case Basics • An actor • is something with behaviour, such as • a person (identified by role), • computer system, • organization • A scenario • is a specific sequence of actions and interactions between • actors and • the system under discussion. • Example: • the scenario of successfully purchasing items with cash • variations such as using credit cards lead to other scenarios IoT – Requirements and Use Cases

  13. Communication Use case association Change a client contact Staff Contact System or subsystem boundary Actor Notation of Use Case Diagrams IoT – Requirements and Use Cases

  14. Use Case Model Example: ATM System IoT – Requirements and Use Cases

  15. Use Cases as Requirements • Use cases place features and functions in a goal-oriented context • Models system requirements in a larger context • A scenario to achieve some value, or some goal • Use cases are requirements: • primarily functional requirements indicating what the system will do • define a promise or contract of how a system will behave IoT – Requirements and Use Cases

  16. Use Case Formats • Use cases are written in different formats, depending on need • Brief (Narrative): • terse one-paragraph summary, usually of the main success scenario • Casual (Scenario): • informal with multiple paragraphs that cover various scenarios • Fullydressed (detailed): • all steps and variations are written in detail and there are supporting sections, such as preconditions and success guarantees IoT – Requirements and Use Cases

  17. Use Case Example • Brief format A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then leaves with the items. IoT – Requirements and Use Cases

  18. A Scenario Form Example • Register Customer With Automatic Activation User enters registration information: Required information: user name, email address, desired login ID and password, and confirmation password One of: account number and challenge data, or ATM # and PIN Optional: language choice and company System checks that password matches confirmation password. System validates required fields and verifies uniqueness of login ID System verifies customer activation information. Systemdisplays registration notification, when finished. IoT – Requirements and Use Cases

  19. Conversation Form Example – Make a Payment Online IoT – Requirements and Use Cases

  20. Success Scenario • The success scenario is the main story-line of the use-case • It is written under the assumption that everything is okay, no errors or problems occur, and it leads directly to the desired outcome of the use-case • It is composed of a sequence of action steps • Example: • Administrator enters course name, code and description • System validates course code • System adds the course to the db and shows a confirmation message IoT – Requirements and Use Cases

  21. Alternative Flows • For each significant action: • Is there another significant way to accomplish it that could be taken at this point? (Variation) • Is there something that could go wrong? (Exception) IoT – Requirements and Use Cases

  22. Alternative Flows • Choices for Describing Variations and exceptions • Add textual descriptions in the variations section of the use case template • Modify the body of the use case to show the variation • Draw an activity diagram IoT – Requirements and Use Cases

  23. Exceptions: “Case did not eject properly” “If a network error occurred during steps 4-7, abort the session” “If the system cannot find or open the file, alert the actor and return to step 4” Variations “Credit card is defined as stolen, the card is retained and transaction is terminated” “User selects to add a new word to the dictionary” “The system detects no more open issues” Alternative Flows - Example IoT – Requirements and Use Cases

  24. Relationship Among Actors • Actor Generalization • The child actor inherits all use-cases associations Should be used only if, the specific actor has more responsibility than the generalized one (i.e., associated with more use-cases) IoT – Requirements and Use Cases

  25. Actor Generalization IoT – Requirements and Use Cases

  26. Three relationship types are used: Include Extend Inheritance (generalization) Relationships Between Use-Cases IoT – Requirements and Use Cases

  27. One use case provides additional functionality that may be required in another use case Extend may be used to represent variations in the way that actors interact with the use case Extension points show when the extension occurs A condition can be placed in the relationship Gift wrap Products Extending Use Cases <<extend>> Product is a gift Perform Sale After checkout IoT – Requirements and Use Cases

  28. Check Project budget Example of extend Relationship Extension points Summary print: system displays balance «extend» user requires print-out ProjectManager Print project summary IoT – Requirements and Use Cases

  29. One use case always includes the functionality of another use case a use case may include more than one other can be used to separate out a sequence of behaviour that is used in many use cases should not be used to create a hierarchical functional decomposition of the system Perform Sale Fill-in billing info Include Relationship <<include>> IoT – Requirements and Use Cases

  30. Example of include Relationship «include» Assign teacher to deliver a module Find module Course Leader IoT – Requirements and Use Cases

  31. Generalization Between Use-Cases • The child use case inherits the behavior parent use case: • The interaction (described in the textual description) • Use case links (associations, include, extend, generalization) • Child use-case can substitute parent Use case • Overriding occurs through the textual description IoT – Requirements and Use Cases

  32. Record completion of a task Staff Change a client contact Assign individual staff to work on a project Assign staff to work on a project Project Manager Assign team of staff to work on a project Example of generalization Relationship IoT – Requirements and Use Cases

  33. Combining generalizations of actors and use-cases can be dangerous Generalization Hazards Bad: Undergrad can submit thesis Good: Only graduate student can submit thesis IoT – Requirements and Use Cases

  34. Use cases carry the majority of the requirements for the system. The development team, with user involvement, writes the use cases. Use cases are built on a common, standard format. Actors may be generalised. Use cases may be grouped, extended or included in other use cases. Summary IoT – Requirements and Use Cases

More Related