CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use...

8
CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams

Transcript of CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use...

Page 1: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

CS 325: Software Engineering

February 3, 2015

Deriving Use Cases from Requirements• Actors and Use Cases• Creating A Use Case Diagram• Complex Use Case Diagrams

Page 2: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Actors and Use Cases

CS 325February 3, 2015Page 2

In a software system model, an actor is a role played by one of the system’s stakeholders who interacts with the system.

A use case is a business process that begins and ends with the actor and that accomplishes a business task for that actor.For example, for a software system that tests the effectiveness of a spam filter, one actor might be a system administrator who is responsible for ensuring that spam messages are blocked from the mailboxes of employees.Among the use cases for this actor:

• Testing how effectively a filter blocks spam

• Testing how effectively a filter permits “ham”

• Determining proper spam probabilities for blocking messages

Page 3: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Actors and Use Cases

CS 325February 3, 2015Page 3

Other actors who might interact with the spam filter tester:

• The developer of a spam filter dictionary, who might need to determine the effectiveness of a dictionary in blocking spam messages and not blocking ham messages.

• A commercial e-mail developer, who might use the tester to determine whether the particular phrasing of a message would cause it to be blocked as spam.

Page 4: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Creating A Use Case Diagram

CS 325February 3, 2015Page 4

• Start with the system boundary and the actors.

SystemAdministrator

CommercialE-Mailer

Spam DictionaryDeveloper

SystemAdministrator

CommercialE-Mailer

Test WhetherPlanned Message Will Be

Interpreted As Spam

Test Whether Spam DictionaryWill Correctly Identify

Common Spam Messages

Test Whether Spam DictionaryWill Incorrectly Identify

Ham Messages As Spam

Determine AppropriateSpam Probabilities

Spam DictionaryDeveloper

• Insert the use cases and the associations.

• Note any extensions, inclusions, and generalizations.

SystemAdministrator

CommercialE-Mailer

Test WhetherPlanned Message Will Be

Interpreted As Spam

Test Whether Spam DictionaryWill Correctly Identify

Common Spam Messages

Test Whether Spam DictionaryWill Incorrectly Identify

Ham Messages As Spam

Determine AppropriateSpam Probabilities

<<include>>

<<include>> Spam DictionaryDeveloper

Page 5: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Creating A Use Case Diagram

CS 325February 3, 2015Page 5

Consider a student information system (SIS) with the following features:

• Student enrollment tools for online registration, class schedule checking, course cancellation notification, wait listing for full classes, submitting transfer credits

• Academic advising support tools for degree auditing, transfer credit equivalencies, prerequisite checking, course requirement overrides

• Faculty tools for generating class rosters, recording course grades, posting new assignments, retrieving laboratory grades

• Administrative tools for enrollment analysis, classroom scheduling, awarding financial aid, inclement weather notifications

Page 6: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Student

TransferStudent

AcademicAdvisor

Professor

InstructorAdministrator

Student

TransferStudent

AcademicAdvisor

Professor

Instructor

RegisterOnline

CheckSchedule

GetWaitlisted

DropCourse

SubmitTransferCredit

Administrator

Student

TransferStudent

AcademicAdvisor

Professor

Instructor

RegisterOnline

CheckSchedule

GetWaitlisted

DropCourse

SubmitTransferCredit

Administrator

AuditDegree

CheckPrereqs

EvaluateTransferCredit

Override Course

Requirements

Student

TransferStudent

AcademicAdvisor

Professor

Instructor

RegisterOnline

CheckSchedule

GetWaitlisted

DropCourse

SubmitTransferCredit

Administrator

AuditDegree

CheckPrereqs

EvaluateTransferCredit

Override Course

Requirements

GenerateRoster

RecordGrades

PostAssignment

RetrieveLab Grades

Creating A Use Case Diagram

CS 325February 3, 2015Page 6

Student

TransferStudent

AcademicAdvisor

Professor

Instructor

RegisterOnline

CheckSchedule

GetWaitlisted

DropCourse

SubmitTransferCredit

Administrator

AuditDegree

CheckPrereqs

EvaluateTransferCredit

Override Course

Requirements

GenerateRoster

RecordGrades

PostAssignment

RetrieveLab Grades

AnalyzeEnrollment

ScheduleClassroom

AwardFinancial Aid

Issue WeatherWarning

Page 7: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Complex Use Case Diagrams

CS 325February 3, 2015Page 7

Student

AcademicAdvisor

CourseInstructor

Add CourseBefore First

Week

Drop CourseBefore Eleventh

Week

DepartmentChair

CollegeDean

Add CourseDuring First

Week

Add CourseDuring Second

Week

Add CourseAfter Second

Week

Drop CourseBetween

Weeks 11-13

The whole point of a use case diagram is to clarify the development team’s understanding of the requirements of the planned system.An overly complicated diagram may obscure that understanding rather than clarifying it.

Page 8: CS 325: Software Engineering February 3, 2015 Deriving Use Cases from Requirements Actors and Use Cases Creating A Use Case Diagram Complex Use Case Diagrams.

Complex Use Case Diagrams

CS 325February 3, 2015Page 8

Splitting the diagram into multiple diagrams, in this case representing smaller subsystems, improves their overall clarity.Also note how the use of the inclusion relationship eliminates potentially confusing redundancies.

Student

AcademicAdvisor

CourseInstructor

Add CourseBefore First

Week

DepartmentChair

CollegeDean

Add CourseDuring First

Week

Add CourseDuring Second

Week

Add CourseAfter Second

Week

<<include>>

<<include>>

<<include>>

Student

AcademicAdvisor

CourseInstructor

Drop CourseBefore Eleventh

Week

Drop CourseBetween

Weeks 11-13