Académique Documents
Professionnel Documents
Culture Documents
Software Design
Slides adapted from Robert B. France and other sources.
1
CSC 450
Evolution
CSC 450
CSC 450
Why do we design?
A key design challenge is controlling complexity
CSC 450
Controlling Complexity
Complexity handling mechanisms:
Modularization - breaking up a solution into logical units. Abstraction - use functional and data abstraction.
CSC 450
Design Principles
Separation of concerns Modularity Abstraction Generality Incrementality Anticipation of change
CSC 450
Design Spec
Design goals
CSC 450
Requirements versus Design Class Diagrams
Domain analysis: Exploratory domain models are class diagrams in which classes represent domain concepts.
Classes in these diagrams DO NOT represent software concepts.
Requirements specification: A requirements class model (system domain model) consists of class diagrams in which the classes represent information that will be maintained by the software. Design specification: A design class model (system model) consists of class diagrams in which classes represent solution concepts.
CSC 450
0..1
VideoRental CashPay ment amount : Money 1 Pay s-f or 1 RentalTransaction 1 date 1 1 1..* dueDate returnDate returnTime
*
Initiates 1 1 Customer address name phoneNumber 1 Has 1 Membership ID startDate 1 LoanPolicy perDay RentalCharge perDay LateCharge 1..* 1 Def ines 1..* Maintains
*
Rents
Stocks 1
Video ID 1
*
1
1 Owns-a
CSC 450
**
Booking
Booking [c2] * *
SpecificFlight
+ specifyAirplane [a1] + createFlightLog [b1] + changeAirplane [d1] + findCrewMember [e1] addLinkToBooking [c3]
0..1
Airplane
addLinkToSpecificFlight [a2, d3] deleteLinkToSpecificFlight [d2]
PassengerRole
+ makeBooking [c1] addLinkToBooking [c4]
0..1
FlightLog
FlightLog [b2]
Design phases
Architectural Design
Identify subsystems and the services they provide Describe interactions across subsystems
CSC 450
Subsystem Design:
Define classes Describe how objects interact to accomplish subsystem services
Sequence diagrams, state machines, etc.
11
CSC 450
Subsystem Design:
Class diagrams Sequence diagrams State machines
CSC 450
Outline
Requirements Analysis Systems Engineering Software Design Implementation Deployment Testing
Evolution
An introduction to software design Software design phases Software design principles UML package diagrams
13
CSC 450
UML Packages
A package is rendered as a tabbed folder A package is a collection of model elements A package owns its model elements
destruction of the package results in destruction of the model elements relationship between a model element and its package is a composition
Domain
Shape
Production
Order Processing
Point Sales
Client
Name in box
Fill Order
Ship Order
Name in tab
Packages as a namespace
Domain Production
CSC 450
+Client
OrderProcessing
Fill Order
CSC 450
Core/Misc
Payments
Products
Sales
Authorization Transactions
16
CSC 450
Authorized-by
* * *
Establishescredit-for
Logs Establishesidentity-for 1 DriversLicense number 1 1 Abused-by 1 Sales::Customer - CreditPayments have CreditPaymentReplies Identifies - CheckPayments have CheckPaymentReplies
1 Accounts Receivable
Domain::Payments::Payment
17
CSC 450
CSC 450
19
CSC 450
Description
A grouping of model elements.
Syntax
Name
Import
A dependency indicating that the public contents of the target package are added to the namespace of the source package. A dependency indicating that the public contents of the target package are available in the namespace of the source package. A dependency indicating that the public contents of the target package are added to the namespace of the source package.
import
Access
access
Merge
merge
20
CSC 450
21
CSC 450
Marketing
+A
<<access>>
Order Processing +A
cut() paste()
<<import>>
-B
22
CSC 450
Package Merge
Marketing
<<merge>> <<merge>>
Accounts Receivable
Order Processing
23
CSC 450
24
CSC 450
Summary
An introduction to software design Software design phases Software design principles UML package diagrams
25
CSC 450
The End
Qu es ti ons?
______________________ Devon M. Simmonds Computer Science Department University of North Carolina Wilmington
_____________________________________________________________
26