Slide 12 SubsystemDesign
Slide 12 SubsystemDesign
Analyze Behavior
(Optional)
Refine the
Architecture
Subsystem
Design Designer Define Design the
Components Database
Design Subsystems
and Interfaces
Subsystem
Design
Project Specific
Guidelines
Design Classes
Interface
Realization (Elided form)
Object Oriented Analysis and Design 5
Subsystem Guidelines
Goals
Loose coupling <<subsystem>>
A
Portability, plug-and-play
compatibility
Insulation from change
<<subsystem>>
Independent evolution B
Strong Suggestions
Do not expose details, only interfaces
Depend only on other interfaces <<subsystem>>
C
Key is abstraction and encapsulation
<<subsystem>>
CourseCatalogSystem
ICourseCatalogSystem
<<subsystem>> package
ICourseCatalogSystem
subsystem responsibility
performResponsibility( )
Op1( )
Subsystem Op2( )
responsibility
Internal
Op3( ) subsystem
interactions
Op4( )
1://create schedule( )
2://get course offerings( )
3://get course offerings( ) Subsystem
Student wishes to 4://display course offerings( )
interface
create a new
schedule
Subsystem responsibility
5://display blank schedule( )
9://add schedule(Schedule)
Analysis-Class-to-Architectural-Mechanism
Map from Use-Case Analysis
Analysis Class Analysis Mechanism(s)
- Done
: Course Catalog
1. getCourseOfferings(Semester)
Retrieve all available course
offerings for the current
semester
Subsystem Proxy
1.1. read(string)
1.1.1. createStatement( )
sql statement is passed in
specifying the search criteria 1.1.2. executeQuery(String)
course offerings in the
current semester 1.1.2.1. // executeQuery( )
1. // close registration( )
1.1. // is registration open?( ) Retrieve a list of course
offerings for the current
semester
2. // close registration( )
Close
2.1. getCourseOfferings(Semester) registration for
each course
offering If the maximum number of
Repeat twice this selected primary courses have
is for simplicity; 2.2. // close registration( )
not been committed, select
realistically, an alternate course offerings).
indefinite number
of iterations could
occur) 2.3. // level( )
Finally commit or
2.4. // close( ) Currently assuming tuition based on
cancel the course
offering once all number of offerings taken and certain
leveling has occurred attributes of students. If different offerings
get different prices this will change slightly.
2.5. getTuition( )
Send student and tuition to
the Billing System, which will
do the actual billing to the 2.6. submitBill(Student, double)
student for the schedule.
subsystem responsibility
Object Oriented Analysis and Design 18
Example: Local BillingSystem Subsystem Interaction
Subsystem Proxy
Billing System : BillingSystem : StudentBillingTransaction : Student :BillingSystemInterface : Billing System
Client
1. submitBill(Student, double)
Retrieve the
information that must
1.1. create(Student, double) be included on the bill
1.2. submit(StudentBillingTransaction)
<<subsystem proxy>>
CourseCatalogSystem
Subsystem Interface
getCourseOfferings(forSemester : Semester) : CourseOfferingList
CourseOfferingList
(from University Artifacts) DBCourseOfferring
0..*
1
<<Entity>>
CourseOffering Connection
(from University Artifacts) (from java.sql) Statement
(from java.sql) ResultSet
(from java.sql)
new() createStatement()
executeQuery()
setData() getString()
executeUpdate()
submitBill() StudentBillingTransaction
<<Entity>>
<<subsystem proxy>>
Student
BillingSystem
(from University Artifacts)
Subsystem Proxy
0..1
BillingSystemInterface
submit(theTransaction : StudentBillingTransaction)
<<subsystem>>
Supporting
Client Support
Types Use with care
<<subsystem>>
CourseCatalogSystem
(from Business Services)
External System
Interfaces
(from Business Services)
University Artifacts
(from Business Services)
java.sql
(from Middleware)
<<subsystem>>
BillingSystem
(from Business Services)
External System
Interfaces
(from Business Services)
University Artifacts
(from Business Services)
(continued)
(continued)