Professional Documents
Culture Documents
<24> 1
Background on Use Case Design
Have ‘done’ Architectural Design;
You know the major (eleven) precepts of good
design.
Now, we drop down a level to Detail Design
Now:
Use Case Design;
Subsystem Design, and
Class Design.
24 3
Objectives: Use-Case Design (2 of 2)
3. Verify that all of the attributes needed for the use cases
have been defined and found in domain models, glossary,
etc.
24 4
Use-Case Design in Context
Architectural
Analysis
Subsystem Design
Use-Case
Analysis
Review the
Use-Case Design Design
Designer Design Reviewer
Class
Design
Here is our workflow suggested by the Unified Process. This is merely an FYI.
Note ‘designer’ activities are related to architecture - but quite different from architect
Important to note detailed design activities (Use Case, Subsystem, and Class Design)
are tightly bound and tend to alternate between
24 one another. 5
Lastly, and very importantly:
24 7
Use-Case Design Overview
Supplementary
Specifications
Use-Case
Design
Use-Case
Realization
Use Case
Design Classes
24 8
Use-Case Realization – UML Notation
Use-Case Model Design Model
Use Case
24 10
Ex: Incorporating Subsystem Interfaces
Analysis Classes Design Elements
Using a subsystem
as the interface to
the Billing System.
<<boundary>>
BillingSystem <<subsystem>>
BillingSystem
// submit bill() IBillingSystem
submitBill(forTuition : Double, forStudent :
Student)
<<boundary>>
CourseCatalogSystem <<subsystem>>
CourseCatalogSystem
// get course offerings() ICourseCatalogSystem
getCourseOfferings(forSemester : Semester) :
CourseOfferingList
Note: Interactions to support external system access will be more complex than can be
implemented in a single class. So, we identified subsystems to encapsulate this access
to external systems. So this type of boundary class (in analysis) typically morphs into a
subsystem in the Design Model. 24 11
Ex: Incorporating Subsystem Interfaces (before)
1. // create schedule( )
1.1. // get course offerings( )
Student wishes to
create a new 1.1.1. // get course offerings(forSemester)
schedule
We know from Architectural Design that a
1.2. // display course offerings( ) CourseCatalogSystem Actor has been
A list of the available defined to represent the external legacy
course offerings for this
semester are displayed Course Catalog System.
A blank schedule 1.3. // display blank schedule( )
is displayed for the So, we need to refine interaction diagram
students to select and replace the CourseCatalogSystem
offerings
boundary class (from analysis) with the
. // select 4 primary and 2 alternate associated subsystem interface,
fferings( ) ICourseCatalogSystem, here in design.
2.1. // create schedule with offerings( )
2.1.1. // create with offerings( )
1: // create schedule( )
1.1: // get course offerings( )
Student wishes to
create a new 1.1.1: getCourseOfferings(Semester)
schedule
Show here how interactions are modeled
1.2: // display course offerings( )
A list of the available between design elements where one element
course offerings for this is a subsystem.
semester are displayed
Original use-case realization from Analysis
A blank schedule 1.3: // display blank schedule( ) was refined and original boundary class
is displayed for the replaced with the associated subsystem
students to select
offerings interface, ICourseCatalogSystem
Access to the Catalog system is represented
2: // select 4 primary and 2 alternate
offerings( )
via an interface to that subsystem…
2.1: // create schedule with
2.1.1: // create with offerings( )
offerings( )
24 15
Ex: Incorporating Subsystem Interfaces - (VOPC)
<<Interface>>
Subsystem interface ICourseCatalogSystem
<<boundary>> (from External System Interfaces)
RegisterForCoursesForm
(from Registration)
<<control>> 1
RegistrationController 0..* getCourseOfferings()
(from Registration) initialize()
// submit schedule()
// display course offerings() <<entity>>
// display schedule() 1 1 // submit schedule()
// save schedule() Schedule
// save schedule() currentSchedule (from University
// create schedule with 0..1
// create schedule() Artifacts)
// getCourseOfferings()
offerings() semester
// select 4 primary and 2 alternate
// display blank schedule()
offerings() 0..1 0..1
// submit()
registrant // save()
0..1 0..* // any conflicts?()
<<entity>> // new()
Student. 0..*
(from University 0..*
Artifacts)
- name
- address 1 alternateCourses
- studentID : int 0..2
primaryCourses <<entity>>
// addSchedule() 0..4 CourseOffering
// getSchedule() (from University
// hasPrerequisites() Artifacts)
number
// passed() startTime
Static part: endTime
days
The above example is the VOPC after incorporating the design elements.
// addStudent()
The original CourseCatalogSystem boundary class has been replaced // removeStudent()
// new()
24 16
with the associated subsystem interface, ICourseCatalogSystem. // setData()
Principle: “Design by Contract”
With this approach, when describing the
interactions, the focus remains concentrated on
the services, NOT on how the services are
implemented (realized) within design elements.
This is known as “Design by Contract” and is one
of the core tenets of robust software development
using abstraction and encapsulation
mechanisms.
Describing HOW the services are implemented is
the focus of Subsystem Design (for the design
subsystems) and Class Design (for the design
classes).
24 22
Use-Case Design Steps - continued
Simplify Interaction Diagrams Using Subsystems
When a use case is realized (that is, ‘design’), the flow of
events is usually described in terms of executing objects;
that is, as interactions between design objects.
Often useful to encapsulate a sub-flow of events within a
subsystem. (below and next slide)
:InterfaceA
<<subsystem>>
MySubsystem
InterfaceA
Op1()
op1()
24 20
Guidelines: Messages sent From Interfaces
Messages to subsystems correspond to operations of the
subsystem interface (the signatures)
Interactions within subsystems will be modeled in
Subsystem Design
24 21
Parallel Subsystem Development
May decide to arrange the interaction diagrams in term
of subsystems or in terms of their interfaces only.
In some projects, it might be necessary to implement
the classes providing the interfaces before you
continue with the rest of the modeling.
The detailed design of the subsystem “internals” is
done during Subsystem Design.
Interfacesare what ensure compatibility between
the Use-Case Design and Subsystem Design.
24 25