02291: System Integration Week 2 Hubert Baumeister hub@imm.dtu.dk - - PowerPoint PPT Presentation

02291 system integration
SMART_READER_LITE
LIVE PREVIEW

02291: System Integration Week 2 Hubert Baumeister hub@imm.dtu.dk - - PowerPoint PPT Presentation

02291: System Integration Week 2 Hubert Baumeister hub@imm.dtu.dk DTU Compute Technical University of Denmark Spring 2013 Contents Requirements Model Domain model Use Cases and Use Case Diagrams Summary Activities in Software


slide-1
SLIDE 1

02291: System Integration

Week 2 Hubert Baumeister

hub@imm.dtu.dk

DTU Compute Technical University of Denmark

Spring 2013

slide-2
SLIDE 2

Contents

Requirements Model Domain model Use Cases and Use Case Diagrams Summary

slide-3
SLIDE 3

Activities in Software Developement

◮ Understand and document what kind of the software the

customer wants

→ Requirements Analysis

◮ external behaviour: what not how

◮ Determine how the software is to be built

→ Design

◮ Build the software

→ Implementation

◮ Validate that the software solves the customers problem

→ Testing → Verification → Evaluation: e.g. User friendlieness

slide-4
SLIDE 4

User Requirements vs System Requirements

  • 1. User Requirements

◮ Used for business decision: go / no-go ◮ Used to solicit offers from software houses ◮ Done by the customer

  • 2. System Requirements

◮ Define how the system is to be built ◮ Foundation for planning the project and cost estimations ◮ Done by the software house

slide-5
SLIDE 5

Example of user requirements vs system requirements

slide-6
SLIDE 6

Travel Agency Example

The travel agency TravelGood comes to you as software developers with the following proposal for a software project:

Problem Description

TravelGood wants to offer a trip-planning and booking application to its customers. The application should allow the customer to plan trips consisting of flights and hotels. First the customer should be able to assemble the trip, before he then books all the flights and hotels in on step. The user should be able to plan several trips. Furthermore it should be possible to cancel already booked trips.

slide-7
SLIDE 7

Types of Requirements

Functional Requirements

Describe the users expectation which functionalities the system should have; i.e. what the system should do E.g.

◮ the user should be able to plan and book a trip

Non-functional Requirements

Everything which the user requires from the system, but which is not functionality: E.g.

◮ Where should the software run (e.g. operating system,

software environment, . . . )

◮ What kind of UI the user prefers (e.g. stand alone

application, Web application, command line interface, graphical interface, . . . )

slide-8
SLIDE 8

Categories of non-functional requirements

Ian Sommerville, Software Engineering - 9

slide-9
SLIDE 9

Characteristics of good requirements

◮ testable

◮ One should be able to devise a test that can decide

whether the system satisfies the requirements or not.

◮ Tests can be manual or automatic

◮ mesurable

◮ Makes non-functional requirements testable

slide-10
SLIDE 10

Example of measurable requirements

◮ ”The system should be easy to use by medical staff and

should be organised in such a way that user errors are minimised”

slide-11
SLIDE 11

Example of measurable requirements

◮ ”The system should be easy to use by medical staff and

should be organised in such a way that user errors are minimised”

◮ Better: ”Medical staff shall be able to use all the system

functions after four hours of training. After this training, the average number of errors made by experienced users shall not exceed two per hour of system use.”

slide-12
SLIDE 12

Possible measures

Ian Sommerville, Software Engineering - 9

slide-13
SLIDE 13

Requirements engineering process

Ian Sommerville, Software Engineering - 9 course 02264: Requirements Engieering

slide-14
SLIDE 14

Requirements Engineering Process: Techniques

◮ Elicitation

◮ Interviews ◮ Domain Model ◮ Use Cases / User Stories

◮ Specification

◮ Domain Model ◮ Use Cases / User Stories

◮ Validation

◮ Criteria: Validity, Consistent, Complete, Realistic, . . . ◮ Techniques: Inspection, Test-case generation, Prototyping

slide-15
SLIDE 15

Contents of the software requirements document

◮ Generic document structure (IEEE standard)

◮ Preface ◮ Introduction ◮ Glossary/Domain Model ◮ User requirements definition ◮ System architecture ◮ System requirements specification ◮ e.g. Use Case Diagram and detailed use cases ◮ System models ◮ (System evolution) ◮ Appendices ◮ Index

slide-16
SLIDE 16

Users of the software requirements document

slide-17
SLIDE 17

Requirements documentation

◮ How to document requirements

1 Use cases for functional requirements 2 Domain model (class diagram, glossary, . . . ) to explain the domain 3 Non-functional requirements

◮ Requirements documentation are important

◮ to record the requirements ◮ traceability ◮ to agree upon requirements with the customer

→ requirements creep

◮ Question: how to deal with changing and unclear

requirements?

→ use an agile process → freeze the specification of the requirements as late as possible

slide-18
SLIDE 18

Requirements issues

◮ Refrain from inventing requirements ◮ Problem descriptions can be very vague

→ Discuss with the customer → Customer knows what he does not want

◮ Requirements can change

◮ e.g. after the customer has seen a first version of the

software

◮ the business situation has changed (cf. finance crises)

slide-19
SLIDE 19

Contents

Requirements Model Domain model Use Cases and Use Case Diagrams Summary

slide-20
SLIDE 20

Domain model

◮ Purpose: capture the customer’s knowledge of the domain

so that the system builders have the same knowledge

◮ Helps customer and system builders to speak the same

language → Necessary to define the terminology used

→ Glossary

→ Relationships between terms are shown in a class diagram

→ Related to the concept of an ontology

→ If necessary, make business processes visible

→ Represented by UML Activity Diagrams

slide-21
SLIDE 21

Glossary

◮ List of terms with explanations ◮ Terms can be nouns (e.g. those mentioned in a problem

description) but also verbs or adjectives e.t.c.

◮ Warning

◮ Capture only knowledge relevant for the application ◮ Don’t try to capture all possible knowledge

slide-22
SLIDE 22

Example

Part of a glossary for a library application

Book

◮ A book is a is a conceptual entity in a library. A book is

defined by its title, the name of his authors, the publisher and the edition. A library can have several copies of the same book. Copy

◮ A copy is a physical copy of a particular book. For

example, the library has three copies of the book ”Using UML” by Perdiate Stevens. . . . . . .

slide-23
SLIDE 23

Terms and their relations

◮ Class diagrams ◮ Usually

◮ Classes (for nouns) ◮ Associations: for static relationships ◮ Generalizations ◮ Use of attributes possible ◮ Often without operations ◮ verbs → operations

◮ Warning

◮ Shows customer knowledge ◮ Should not be biased by implementation

slide-24
SLIDE 24

Domain model (terms and their relations)

Associations Name of the association Multiplicities Class Attributes Reading direction Generalization

slide-25
SLIDE 25

Contents

Requirements Model Domain model Use Cases and Use Case Diagrams Summary

slide-26
SLIDE 26

Purpose of Use Cases

◮ Capture mainly functional requirements ◮ Use Cases for planning

◮ Use Case Driven Design ◮ Planning Game (from Extreme Programming)

◮ System Validation

◮ Show that the sceanarios of the use cases can be realized

by the system, e.g. by drawing sequence diagrams → Walking the use case

◮ Use Cases describe what is to be achieved and not how

slide-27
SLIDE 27

Def Use Case

Introduced by Ivar Jacobson in the early 1990’s

Use Case

A Use Case is a set of interaction scenarios of one or several actors with the system serving a common goal.

◮ Interaction

◮ Anything the actor does with the system ◮ System responses ◮ Effects visible/important to the customer

◮ Not part of the interaction: What the system internally does

slide-28
SLIDE 28

Use Case

  • 1. Use case diagrams

◮ Gives an overview of the use cases and actors for a system ◮ Uses graphical notation ◮ Shows relations between actors: Generalization: ◮ Shows relations between use cases: Generalization,

Inclusion,Extension

  • 2. Simple use case description

◮ Textual description of what is achieved by the use case

  • 3. Detailed use case description

◮ Detailed description of what is achieved by the use case ◮ Follows a use case template ◮ Describes pre- / postconditions, main- and secondary

scenarios (among others)

slide-29
SLIDE 29

Example: Use Case Diagram

slide-30
SLIDE 30

Example: Simple Use case description

Borrow Book

A borrower presents a book or DVD. the system checks that the potential borrower is a member of the library, and does not already have 5 books or DVDs on loan. If both checks succeed, the system records that this library member has this copy of the book on loan.

slide-31
SLIDE 31

Example: Detailed Use Case description

slide-32
SLIDE 32

Detailed use cases: Template

Template to be used in this course for detailed use case descriptions

name: The name of the use case description: A short description of the use case actor: One or more actors who interact with the system precondition: Possible assumptions on the system state to enable the use case main scenario: A description of the main interaction between user and system

→ Note: should only explain what the system does from the user’s perspective

alternative scnearios: Secondary scenarios; fail scenarios postcondition: What has been achieved after the use case has been executed? note: Used for everything that does not fit in the above categories

slide-33
SLIDE 33

Travel Agency: detailed use case list available flights

name: list available flights description: the user checks for available flights actor: user main scenario:

  • 1. The user provides information about the city to travel to and

the arrival and departure dates

  • 2. The system provides a list of available flights with prices

and booking number

alternative scenario:

  • 1a. The input data is not correct (see below)
  • 2. The sytem notifies the user of that fact and terminates and

starts the use case from the beginning

  • 2a. There are no flights matching the users data
  • 3. The use case starts from the beginning

note: The input data is correct, if the city exists (e.g. is correctly spelled), the arrival date and the departure date are both dates, the arrival date is before the departure date, arrival date is 2 days in the future, and the departure date is not more then one year in the future

slide-34
SLIDE 34

Travel Agency: detailed use case cancel trip

name: cancel trip description: cancels a trip that was booked actor: user precondition:

◮ the trip must have been booked ◮ the first date for a hotel or flight booking must be one day in

the future

main scenario:

  • 1. user selects trip for cancellation
  • 2. the system shows how much it will cost to cancel the trip
  • 3. selected trip will be cancelled after a confirmation
slide-35
SLIDE 35

Travel Agency: detailed use case plan trip

name: plan trip description: The user plans a trip consisting of hotels and flights actor: user main scenario:

repeat any of the following operations in any oder until finished

  • 1. list avaialbe flights (use case)
  • 2. add flight to trip (use case)
  • 3. list availabe hotels (use case)
  • 4. add hotel to trip (use case)
  • 5. list trip (use case)
  • 6. delete hotel from trip (use case)
  • 7. delete flight from tip (use case)

Note: the trip being planned is referred to as the current trip

slide-36
SLIDE 36

Travel Agency: detailed use case save trip

name: save trip description: provides the current trip with a name and saves it for later retrievel actor: user precondition: the current trip is not empty main scenario:

  • 1. user provides a name for the trip

alternative scenarios:

1: the name is not valid

2: notify the user of the fact and end the use case

1: a trip with the name already exists

2: ask the user if the trip should overwrite the stored trip 3a: If yes, overwrite the stored trip 3b: If no, end the use case

slide-37
SLIDE 37

Use Case Diagrams Concepts

◮ Use case diagram = special type of class diagram

◮ Classes: actor and use case ◮ Associations: Lines between actor and use case (no arrow) ◮ Dependencies: Broken arrows between use cases (a

broken line)

◮ Inheritance: Lines with a closed arrow (example later)

slide-38
SLIDE 38

Actors

◮ Who should be actor

◮ Beneficionary of the use case ◮ Participant in the use case

◮ What role does the actor play

◮ not specific persons like action John Doe ◮ ”A person wearing a particular hat”

◮ Actors can be

◮ Human: e.g the user of the system ◮ Non Human: an external system or device

slide-39
SLIDE 39

Subject of a use case / system boundary

◮ The class described by a set of use cases ◮ Usually these are systems or subsystems ◮ Shown as a subject/system boundary

slide-40
SLIDE 40

Use cases and subsystems

Game Server Phone MUD 1 *

→ Use cases: on any abstraction level → Describe requirements on the system, as well as the subsystem level → Subsystems of a system don’t appear as actors

slide-41
SLIDE 41

Relationships among use cases and actors

◮ Between use cases

◮ Includes ◮ Extends ◮ Generalizations

◮ Between actors

◮ Generalization

→ Note: Almost all model elements in the UML can be used to inherit from

slide-42
SLIDE 42

Includes Relationship

slide-43
SLIDE 43

Extends Relationship

slide-44
SLIDE 44

Extends Relationship

◮ One use case can extend another use case at a given

extension point

◮ extends is used if one wants to indicate variation of the

  • riginal use case

◮ extends implies optional path ◮ includes implies mandatory path

slide-45
SLIDE 45

Extends Relationship

slide-46
SLIDE 46

Generalisation between actors

slide-47
SLIDE 47

Generalisation between use cases

◮ Special use case: same or more specialised goal then the

general use case

slide-48
SLIDE 48

Types of use cases

a) Business use cases (kite level use case (from Alistair Cockburn)) b) System use cases / sea level use case c) Use cases included in sea level use cases are called fish level use cases by Alistair Cockburn

UML Destilled, Martin Fowler

slide-49
SLIDE 49

Travel Agency functional requirements: Business use cases

slide-50
SLIDE 50

Travel Agency functional requirements: System level use cases (only part of the system)

Search Avaialbe Flights Search Available Hotels User TravelAgency Add Hotel to Trip Add Flight to Trip List Trip Delete Hotel from Trip Delete Flight from Trip

slide-51
SLIDE 51

Travel Agency functional requirements: System level use cases relating to busines use cases

slide-52
SLIDE 52

Use Case Benefits

◮ Technique for capturing the functional requirements of a

system

◮ Easily understandable ◮ Easy to check for completness

◮ Use case diagram ◮ Use case main vs. alternative scenarios: catch all possible

interactions

◮ Use cases in planning

◮ Basis for the estimating, scheduling, and validating effort ◮ Use cases can be relatively easily added and removed from

a software project as priorities change.

◮ Test Cases (System, User Acceptance and Functional) can

be directly derived from the use cases

slide-53
SLIDE 53

Use Case Limitations

◮ Not good for capturing non-interaction based requirements

e.g.

◮ algorithm or mathematical requirements ◮ non-functional requirements (such as platform,

performance, timing, or safety-critical aspects)

◮ Abstracts away from the GUI

◮ Use case theory suggests that UI not be reflected in use

cases

◮ but GUI mock ups (paper based, powerpoint based, etc.),

prototypes may be more useful than abstract functionality

slide-54
SLIDE 54

Contents

Requirements Model Domain model Use Cases and Use Case Diagrams Summary

slide-55
SLIDE 55

Summary

◮ Requirements Engineering

◮ What the customer expects from the system

◮ Requirements Process: Elicitation, Documentation,

Validation

◮ Requirements Elicitation: Interviews, Scenarios, Use

Cases

◮ Requirements Documentation

◮ Domain Model: Class diagram + possibilty activity diagram

for business processes

◮ Use Cases: ◮ 1) Use Case Diagram → provides an overview over the

functionality of the system

◮ 2) Detailed use cases → provide the details of the ◮ User Stories

◮ Use case driven developement

slide-56
SLIDE 56

Tools

◮ Two classes: simple drawing tools and meta model based

modelling tools

slide-57
SLIDE 57

Tools

◮ Two classes: simple drawing tools and meta model based

modelling tools

◮ Drawing tools

◮ UMLet (Eclipse plugin www.umlet.com) ◮ Violet UML (Eclipse plugin http:

//alexdp.free.fr/violetumleditor/page.php)

◮ Visio (Windows only; available though DTU agreement with

Microsoft)

slide-58
SLIDE 58

Tools

◮ Two classes: simple drawing tools and meta model based

modelling tools

◮ Drawing tools

◮ UMLet (Eclipse plugin www.umlet.com) ◮ Violet UML (Eclipse plugin http:

//alexdp.free.fr/violetumleditor/page.php)

◮ Visio (Windows only; available though DTU agreement with

Microsoft)

◮ Modeling tools

◮ Topcased (www.topcased.org) ◮ MagicDraw ◮ Rational Modeller (IBM) ◮ Eclipse UML (Omondo www.omondo.com) ◮ eUML (Soyatec www.soyatec.com) (Only class and

sequence diagrams)