Documente Academic
Documente Profesional
Documente Cultură
11
11
Learning Objectives
Explain the purpose and objectives of object-oriented design Develop component diagrams and deployment diagrams
11
Overview
This chapter is thorough explanation of how to design simple systems Architechtural design is used to define the structure and configuration of the new system
11
Bridge between users requirements and new systems programming Object-oriented design is process by which detailed object-oriented models are built Programmers use design to write code and test new system User interface, network, controls, security, and database require design tasks and models
4
11
Objects send each other messages and collaborate to support functions of main program
OO systems designer provides detail for programmers
Design class diagrams, interaction diagrams, and some state machine diagrams
5
11
Figure 11-1
Systems Analysis and Design in a Changing World, 5th Edition 6
11
Use case diagrams, use case descriptions and activity diagrams, domain model class diagrams, and system sequence diagrams
Component diagrams and Deployment diagrams Interaction diagrams and package diagrams Design class diagrams
11
Figure 11-2
Systems Analysis and Design in a Changing World, 5th Edition 8
11
11
Figure 11-3
Systems Analysis and Design in a Changing World, 5th Edition 10
11
Component Diagram
Shows overall system architecture API is the set of all public methods available in the component
Ports
11
11
Figure 11-4
Systems Analysis and Design in a Changing World, 5th Edition 12
11
Figure 11-6
Systems Analysis and Design in a Changing World, 5th Edition 13
11
Figure 11-7
Systems Analysis and Design in a Changing World, 5th Edition 14
11
Figure 11-8
Systems Analysis and Design in a Changing World, 5th Edition 15
11
Deployment Diagrams
16
11
Figure 11-11
Systems Analysis and Design in a Changing World, 5th Edition 17
11
Sequence diagrams define the interactions between objects in order to execute a use case.
18
11
Figure 11-12
Systems Analysis and Design in a Changing World, 5th Edition 19
11
Figure 11-13
Systems Analysis and Design in a Changing World, 5th Edition 20
11
Figure 11-14(a)
Systems Analysis and Design in a Changing World, 5th Edition 21
11
Figure 11-15
Systems Analysis and Design in a Changing World, 5th Edition 22
11
UML does not distinguish between design class notation and domain model notation Domain model class diagram shows conceptual classes in users work environment Design class diagram specifically defines software classes
11
Figure 11-16
Systems Analysis and Design in a Changing World, 5th Edition 24
11
Control mediates between boundary and entity classes, between the view layer and domain layer Boundary designed to live on systems automation boundary, touched by users
25
11
Method visibility, method name, type-expression (return parameter), method parameter list (incoming arguments) Overloaded method method with same name but two or more different parameter lists Class-level method method associated with class instead of each object (static or shared method), denoted by an underline
26
11
Figure 11-17
Systems Analysis and Design in a Changing World, 5th Edition 27
11
Overloaded method a method with one name but different parameter lists
Class-level method a method associated with the class rather than an object
Class-level attribute an attribute that contains the same value for all objects Overridden method a method in a subclass that overrides the parents method
11
Figure 11-18
Systems Analysis and Design in a Changing World, 5th Edition 29
11
Navigation Visibility
30
11
Navigation Visibility
Figure 11-20
Systems Analysis and Design in a Changing World, 5th Edition 31
11
One-to-many with superior to subordinate. The visibility goes from the superior to the subordinate
32
11
Figure 11-21
Systems Analysis and Design in a Changing World, 5th Edition 33
11
Select a single use case Identify class with primary responsibility Identify other classes that collaborate with primary class (become requests for service to other classes) Identify responsibilities within each class (these become methods)
34
11
Figure 11-22
Systems Analysis and Design in a Changing World, 5th Edition 35
11
Figure 11-23
Systems Analysis and Design in a Changing World, 5th Edition 36
11
Figure 11-24
Systems Analysis and Design in a Changing World, 5th Edition 37
11
Encapsulation each object is self-contained unit that includes data and methods that access data
Object reuse designers often reuse same classes for windows components
Information hiding data associated with object is not visible to outside world
38
11
Coupling qualitative measure of how closely classes in a design class diagram are linked
Number of navigation arrows in design class diagram or messages in a sequence diagram Loosely coupled system is easier to understand and maintain
Separation of responsibility divide low cohesive class into several highly cohesive classes
Highly cohesive system is easier to understand and maintain and reuse is more likely
39
11
Protection from variations parts of a system that are unlikely to change are segregated from those that will
Indirection an intermediate class is placed between two classes to decouple them but still link them
Object responsibility Objects are responsible for system processing
40
11
Summary
Object-oriented design is the bridge between user requirements (in analysis models) and final system (constructed in programming language) Systems design is driven by use cases, design class diagrams, and CRC Cards
41
11
Summary (continued)
Encapsulation data fields are placed in classes along with methods to process that data
Low coupling connectivity between classes High cohesion nature of an individual class Protection from variations parts of a system that are unlikely to change are segregated from those that will Indirection an intermediate class is placed between two classes to decouple them but still link them Separation navigation access classes have to other classes