260 likes | 453 Views
Requirements Modeling using UML 2.0 Use Cases. Requirements Engineering. Software Lifecycle Activities. Software Design. Requirements Analysis. Implementation. System Engineering. Define software features. Testing. Deployment. Evolution. Example: Online HR System.
E N D
Requirements Engineering • Software Lifecycle Activities Software Design Requirements Analysis Implementation System Engineering • Define software features Testing Deployment Evolution
Online HR System: Update Benefits Use Case • Actors: employee, healthcare plan system, insurance plan system • Precondition: • Employee has logged on to the system and selected ‘update benefits’ option • Basic course • System displays employee account • System asks employee to select medical plan type; include Update Medical Plan. • System asks employee to select dental plan type; include Update Dental Plan. • … • System asks user to select benefits options: benefit options • reimbursement option selected: Elect Reimbursement for Healthcare • stock option selected: Elect Stock Purchase
Simple Use Case example • Actor Inputs • Customer submits identification information • 3. Customer submits items to be rented • Customer pays. System Response 2. If customer is authenticated, then request rental items 4. Display calculated price. 6. Inform customer that payments is authorized Item Rental Use Case
Relating Use Cases • Specializing/generalizing use cases • Including use cases • Extending use cases
Use Case Modeling: Core Relationships <<extend>> <<include>>
Including Use Cases • A use case can include another use case at a specified location. • Used to avoid writing the same flow of events across a number of use cases. • The included use case must not be a stand-alone use case. inclusion base
Extension Points • A use cases may have extension points. • An extension point is a point in the use case where its behavior may be augmented with additional behavior. • The additional behavior is specified by the extending use case. • The use case that is extended is called the base use case. • The extend relationship • The relationship between a base use case and an extending use case. • The extend relationship may be conditional
Extending Use Cases extension base • The base use case can act as a stand-alone use case. • The base use case can only be extended at extension points. • Often used to separate optional behavior from mandatory behavior. • Also used to model a separate flow that is executed under certain conditions. On-Line Help
Actor Inputs • Customer submits identification information • 3. Customer submits items to be rented • Customer pays. System Response 2. If customer is authenticated, then request rental items 4. Display calculated price. 6. Inform customer that payments is authorized Use Case Description Item Rental Use Case Any of the numbered activities could serve as an extension point. Extension point syntax: <extension point>::=<name>[:<explanation>]
Use Case Relationships Fig. 3-54, UML Notation Guide
Update Benefits ______________ Extension points extension point benefit o ptions: name and after required enrollments location Employee <<extend>> <<extend>> employee requests employee requests reimbursement option stock purchase option Elect Elect Stock Reimbursement extension Purchase for Healthcare condition Online HR System: Use Case Extension
Online HR System: Update Benefits Use Case with extension point • Actors: employee, healthcare plan system, insurance plan system • Precondition: • Employee has logged on to the system and selected ‘update benefits’ option • Basic course • System displays employee account • System asks employee to select medical plan type; include Update Medical Plan. • System asks employee to select dental plan type; include Update Dental Plan. • … • System asks user to select benefits options: benefit options • reimbursement option selected: Elect Reimbursement for Healthcare • stock option selected: Elect Stock Purchase
Online HR System: Update Benefits Use Case • Actors: employee, employee account db, healthcare plan system, insurance plan system • Precondition: • Employee has logged on to the system and selected ‘update benefits’ option • Basic course • System displays employee account information • System asks employee to select medical plan type; include Update Medical Plan. • System asks employee to select dental plan type; include Update Dental Plan. • … • Alternative courses • If health plan is not available in the employee’s area the employee is informed and asked to select another plan...
Specializing Use Cases • Generalizing/specializing use cases • A specialized use case inherits the behavior (sequences of actions) of its parent(s). • A specialized use case can override some of the behavior of its parent(s). It can also add to the behavior. • A specialized use case can be used anywhere the general use case is expected.
Open file Ordinary User Open file by Open file by typing name browsing «extend» «include» Attempt to open file Browse for file that does not exist System Administrator Example of Use Case Relationships
Qu es ti ons? Summary • What’s coming next class? ______________________ Devon M. Simmonds Computer Science Department University of North Carolina Wilmington _____________________________________________________________