diagrams

54
1 Real-time requirements Intro to Software Engineering Software Development Process Models Formal methods in software specification Structured Analysis Object-oriented analysis and the UML Use Cases

Upload: rohan-rath

Post on 11-Jul-2015

336 views

Category:

Education


2 download

TRANSCRIPT

Page 1: Diagrams

1

Real-time requirements Intro to Software Engineering Software Development Process Models Formal methods in software specification Structured Analysis Object-oriented analysis and the UML

Use Cases

Page 2: Diagrams

2

Object-oriented analysis– Use Case

Use Case diagram of inertial measurement system.

Page 3: Diagrams

3

Context diagram

Inertial Measurement System

Page 4: Diagrams

4

Example: Library Use Case Diagram

EmployeeLogin

LibEmployee

CheckAvailabilityLibUser

Recall

CheckOutBarCodeReader

CheckIn

UsersDB

A computerized library system for a university keeps track of all books and periodicals in the library and their check-out status. Checkout and return are automated through a bar code reader (an external device). The library system also interfaces with an external relational database which stores information about the library users (students, faculty, and staff), including whether they have any library items checked out. . Library users can access the catalog and recall books and periodicals. Library employees have the same access as well as additional capabilities (e.g., listing the status of an item). (Note: the library catalog is part of the library computer system so it is not shown as an actor.)

Page 5: Diagrams

5

Use Case for Employee Login

EmployeeLogin

LibEmployee

CheckAvailabilityLibUser

Recall

CheckOutBarCodeReader

CheckIn

UsersDB

1. Employee initiates use case by entering user name

2. System prompts for password

3. If password is valid, employee is logged on and now has access to employee commands

Starting and Ending Conditions?

Exceptions? e.g., cannot find the employee login

Page 6: Diagrams

6

Use Case for Check book availability

EmployeeLogin

LibEmployee

CheckAvailabilityLibUser

Recall

CheckOutBarCodeReader

CheckIn

UsersDB

1. User/Employee initiates use case by selecting the check book availability option

2. System prompts for choice of search by title, author, or call number

3. User makes selection and enters title, author or call number

4. System performs search through the library catalog database

5. If a match is found, system displays item status (not checked out, checked out and due date, overdue)

Starting and Ending Conditions?Exceptions?

Page 7: Diagrams

7

<<Include>>: Functional Decomposition

Problem: A function in the original problem statement is too

complex to be solvable immediately Solution:

Describe the function as the aggregation of a set of simpler functions. The associated use case is decomposed into smaller use cases

CreateDocument

Scan OCR Check

<<include>><<include>>

<<include>>

Page 8: Diagrams

8

<<Include>>: Reuse of Existing Functionality

Problem: How can we reuse existing functions?

Solution: The include association (“A delegates to B”)

Note: The base case cannot exist alone. It is always called with the supplier use case

ViewMap

OpenIncident

AllocateResources

<<include>>

<<include>>

Base UseCase

SupplierUse Case

Page 9: Diagrams

9

Home Automation example – factor out common functionality

User

ToggleTeaPot

ToggleShades

ToggleHotTub

<<include>>

<<include>>

<<include>>

ToggleAppliance

TeaPot

Shades

HotTub

Page 10: Diagrams

10

Another Home Automation example – factor out common functionality

LogFunctions

ControlLights Lights

(from Use Case Vi ew)

User

(from Use Case View)

FeedDogs DogFeeder

<<include>>

<<include>>

Page 11: Diagrams

11

<<Extend>> Association for Use Cases

Problem: The functionality in the original problem

statement needs to be extended. Solution:

An extend association: B is an extension of A.

Note: In an extend association, the base use case can be executed without the use case extension

ReportEmergency

FieldOfficerHelp

<<extend>>A

BBase Use

Case

Page 12: Diagrams

12

Home Automation example

User

False Alarm

<<extend>>

Sound Alarm

Entry Sensor

Page 13: Diagrams

13

ValidateUser

CheckPassword

CheckFingerprint

ParentCase Child

Use Case

Generalization association in use cases Problem:

You have common behavior among use cases and want to factor this out.

Solution:

The generalization association factors out common behavior.

Page 14: Diagrams

14

Example using <<extend>>

BuyOneWayTicket

BuyWeeklyCardTraveler

BuyMonthlyCard

CentralCompSys UpdateTariff

TransactionAborted

DistributorOutOfChange

<<extend>>

<<extend>>

<<extend>><<extend>>

<<extend>>

<<extend>>

Page 15: Diagrams

15

Simplified with an abstract use case

BuyOneWayTicket

BuyWeeklyCardTraveler

BuyMonthlyCard

CentralCompSys UpdateTariff

TransactionAborted

DistributorOutOfChange

DistributorExcept ion

<<extend>>

<<extend>>

<<extend>>

Page 16: Diagrams

16

Anesthesia Machine Use Cases

Page 17: Diagrams

17

Decomposition of the Deliver Anesthesia Use Case

Page 18: Diagrams

18

Use Case Activity Breakdown

Page 19: Diagrams

19

Ventilator Use Cases

Page 20: Diagrams

20

User Interface Use Cases

Page 21: Diagrams

21

Vaporizer Use Cases

Page 22: Diagrams

22

SPO2 Monitor Use Cases

Page 23: Diagrams

23

CO2 Monitor Use Cases

Page 24: Diagrams

24

Agent Monitor Use Cases

Page 25: Diagrams

25

Breathing Circuit Use Cases

Page 26: Diagrams

26

Bad Use Case Modeling

Page 27: Diagrams

27

Adding aTexturalCharacterization

Page 28: Diagrams

28

Use Case Relations

Page 29: Diagrams

29

Relating Text and Scenarios

Page 30: Diagrams

30

Use Case Sequence Diagram

Page 31: Diagrams

31

Deliver Anesthesia Collaboration

Page 32: Diagrams

32

Elaborated Scenario Part 1

Page 33: Diagrams

33

Elaborated Scenario Part 2

Page 34: Diagrams

34

Alarm On Critical Event Statechart

Page 35: Diagrams

35

Statechartsand

SequenceDiagrams

Page 36: Diagrams

36

Display Waveform Activity Diagram

Page 37: Diagrams

37

Use Case Timing

Diagram

Page 38: Diagrams

38

Best practices in specifying requirements Bad:

The systems shall be completely reliable. The system shall be modular. The system shall be maintainable. The system will be fast. Errors shall be less than 99%.

Better: Response times for all level one actions will be less than 100

ms. The cyclomatic complexity of each module shall be in the

range or 10 to 40. 95% of the transactions shall be processed in less than 1 s. An operator shall not have to wait for the transaction to

complete. MTBF shall be 100 hours of continuous operation.

Page 39: Diagrams

ניתוח מערכות מידע 39

Updat e Item s

B ook shop

W orker

S hip Order

B ook shop

M anager

Update S taff Details

Regis ter Details

Cus tom er1

S ys tem Login

Update Cus tom er Details

A dd Item s to S hoppingCart

Handle Order

< < inc lu de> >

< < ex tend>>

< < inc lude> >

M ake Order

< < inc lude> >

A More Complicate Example

Page 40: Diagrams

Client ATMMachine SavingAccount

Insert ATM card

Request PIN

Enter PIN code

Verify PIN code

PIN valid

Request amount

Enter amount

Process transaction

Transaction successful

Dispense cash

Print receipt

Objects/Classes

lifeline

activation

Page 41: Diagrams
Page 42: Diagrams
Page 43: Diagrams

Typically, actors interact with boundary classes, which in turn interact with control classes, which in turn interact with entity classes.

Page 44: Diagrams
Page 45: Diagrams

OOAD45

Activity Diagram: An example

Page 46: Diagrams

OOAD46

Swimlane- partition an activity diagram so that parts in the swimlane relevant to that activities in the partition- helpful in investigating responsibilities for interactions and associations between objects and actors

Page 47: Diagrams

New Approach for Gathering Latinitas’ Requirements

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Page 48: Diagrams

New Approach for Gathering Latinitas’ Requirements

Donor

Latinitas System

Context Diagram

Donor’s info

Donation request

Donation follow up

Donation

Thank you letter

Intern

Intern’s data

Request for interview & resume

Response to internship offer

Project assignment

Volunteer

Volunteer’s data

Invitation to join committee

Invitation follow up

Job duty

Acknowledgement ofIntern’s application

Interview response & resume

Internship offer

Project results

Internship evaluation

Response to invitation

Venues

Request for venue’s availability

Venue’s availability

Fund Raising Donor

Funds

Goods

Informational follow -up

Response to informational

Invitation to informationalHours worked

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Page 49: Diagrams

New Approach for Gathering Latinitas’ Requirements

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Donor

Donor’s info

Donation follow up

Donation

Thank you letter

Intern Acknowledgement ofIntern’s application

Intern’s data

Request for interview & resume

Response to internship offer

Internship offerInterview response & resume

Project assignmentProject results

Internship evaluation

Volunteer

Volunteer’s dataInvitation to informational

Invitation to join committee

Response to invitationInvitation follow up

Figure 0 Diagram

3___________

Hire, assign job and track interns’ hours___________

Intern Committee

2___________

Hire, assign job and track volunteers’

hours___________Committees

1___________

Organize Fund Raising

Event___________Fund Raising Committee

Job dutyHours worked

Job duties

Donation request

4___________

Determine needs for

funds___________Committees

Funds collected

Request for event

Venues

Request for venue’s availability

Venue’s availability

Fund Raising Donor

Funds

Goods

Request for donations

Collected donations

Informational follow up

Response to informational

Page 50: Diagrams

New Approach for Gathering Latinitas’ Requirements

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Donor

Donor’s info

Donation follow up

Donation

Thank you letter

Intern Acknowledgement ofIntern’s application

Intern’s data

Request for interview & resume

Response to internship offer

Internship offerInterview response & resume

Project assignmentProject results

Internship evaluation

Volunteer

Volunteer’s dataInvitation to informational

Invitation to join committee

Response to invitationInvitation follow up

Figure 0 Diagram

3___________

Hire, assign job and track interns’ hours___________

Intern Committee

2___________

Hire, assign job and track volunteers’

hours___________Committees

1___________

Organize Fund Raising

Event___________Fund Raising Committee

Job dutyHours worked

Job duties

Donation request

4___________

Determine needs for

funds___________Committees

Funds collected

Request for event

Venues

Request for venue’s availability

Venue’s availability

Fund Raising Donor

Funds

Goods

Request for donations

Collected donations

Informational follow up

Response to informational

Page 51: Diagrams

New Approach for Gathering Latinitas’ Requirements

Donor

Donor’s info

Donation follow up

Donation

Thank you letter

Figure 1 Diagram

1.1___________

Obtain and process

donations___________

Volunteer/Intern

Donation request

1.3___________

Search for venues

___________Voluteer/Intern

1.2___________

Determine range of dates

to hold fund raising event___________

Volunteer/Intern

1.4___________

Promote/market fund raising

event____________Volunteer/Intern

1.5___________

Hold event and collect funds

___________Volunteer/Intern

Venues

Request for venue’s availability

Venue’s availability

4___________

Determine needs for funds___________Committees

Funds collected

Request for

eventEvent dates

Event dates and place

Event’s information

Fund Raising Donor

Funds

Goods

Request fordonations

Collected donations

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Page 52: Diagrams

New Approach for Gathering Latinitas’ Requirements

Donor

Donor’s info

Donation follow up

Donation

Thank you letter

Figure 1 Diagram

1.1___________

Obtain and process

donations___________

Volunteer/Intern

Donation request

1.3___________

Search for venues

___________Voluteer/Intern

1.2___________

Determine range of dates

to hold fund raising event___________

Volunteer/Intern

1.4___________

Promote/market fund raising

event____________Volunteer/Intern

1.5___________

Hold event and collect funds

___________Volunteer/Intern

Venues

Request for venue’s availability

Venue’s availability

4___________

Determine needs for funds___________Committees

Funds collected

Request for

eventEvent dates

Event dates and place

Event’s information

Fund Raising Donor

Funds

Goods

Request fordonations

Collected donations

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Page 53: Diagrams

New Approach for Gathering Latinitas’ Requirements

Donor

Donor’s info

Donation request

Donation

1.1.1___________Enter Donor’s

info into system

___________Intern/

Volunteer

Donors’ information

Processed donor’s info

1.1.2___________

Request donations for

event___________

Intern/Volunteer

Processed donor’s info

1.1.3___________

Collect donations

___________Intern/

Volunteer

1.1.4___________Follow up on request for donation

___________Intern/

Volunteer

Donors contacted per event

Donor contactedDonor contacted

Record of donations for event

Donations per event

Record of donations for event

Thank you letter

Figure 1.1 Diagram

Donation follow up

Collected donations

4___________

Determine needs for

funds___________

Committes

Request for donations

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»

Page 54: Diagrams

New Approach for Gathering Latinitas’ Requirements

Donor

Donor’s info

Donation request

Donation

1.1.1___________Enter Donor’s

info into system

___________Intern/

Volunteer

Donors’ information

Processed donor’s info

1.1.2___________

Request donations for

event___________

Intern/Volunteer

Processed donor’s info

1.1.3___________

Collect donations

___________Intern/

Volunteer

1.1.4___________Follow up on request for donation

___________Intern/

Volunteer

Donors contacted per event

Donor contactedDonor contacted

Record of donations for event

Donations per event

Record of donations for event

Thank you letter

Figure 1.1 Diagram

Donation follow up

Collected donations

4___________

Determine needs for

funds___________

Committes

Request for donations

Volunteer

Login &Authenticate

Add/ImportConstituents

Search and ViewContributions

Send E-mailNotifications

Print MailingLabels

Generate Reports

Latinitas’ System

Add/ImportContributions

Edit/DeleteContributions

Search and ViewConstituents

Edit/DeleteConstituents

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

«extends»

Check forDuplicate Constituent

«extends»