Documente Academic
Documente Profesional
Documente Cultură
2.0
20011GC20
M013166
Authors
Kate Heap
Tom Richards
Contents
Lesson 1
Objectives 1-2
Todays Challenges 1-4
How Can Object Technology Help? 1-5
The Promise of Object Orientation 1-9
Where Can Objects be Used? 1-11
Development Methods and Tools 1-13
What Is an Object Oriented Method? 1-14
Modeling the Real World 1-15
Examples of OO Methods 1-16
New Terms, Old Ideas 1-17
What is UML? 1-18
Closing Thoughts 1-19
Summary 1-20
Lesson 2
Objectives 2-2
What Is an Object? 2-3
A Database Analogy 2-4
Objects Perform Operations 2-5
Objects Remember Values 2-6
Objects Are an Abstraction 2-7
Encapsulation and Information-Hiding 2-8
Examples and Benefits 2-9
Class Discussion:
Spot the Operations and Attributes 2-10
How Objects Interact -- Messages 2-11
The Donut Diagram 2-12
Objects Associate with Each Other 2-13
How Many Objects Are in an Association? 2-14
Object Composition 2-15
More on Composition 2-16
Where Objects Come From -- Classes 2-17
Why Do We Need Classes? 2-18
iii
iv
Lesson 3
Objectives 3-2
Phases of a Project 3-3
The Traditional Waterfall Life Cycle 3-5
The Iterative Life Cycle 3-7
Iterative Development 3-8
Incremental Delivery 3-9
OO DevelopmentThe Micro Process 3-10
OO DevelopmentThe Macro Process 3-11
Goals of OO Analysis and Design 3-13
OO Analysis Overview 3-14
OOAPeople and Tools 3-15
OO Design Overview 3-16
Design Overview, continued 3-17
OODPeople and Tools 3-18
OO Implementation Overview 3-19
ImplementationPeople and Tools 3-21
Implementation Languages and Tools 3-22
Popular OO Programming Languages 3-24
Smalltalk 3-26
C++ 3-28
Java 3-29
Benefits of Java 3-31
Summary 3-32
Lesson 4
Objectives 4-2
The Problem of Misunderstood Scope 4-3
Specifying System Behavior 4-4
Use Cases Solution 4-5
What Is an Actor? 4-6
Actors 4-7
Describing Actors 4-8
Sample Actor 4-9
The CarsRUs Case Study 4-10
The CarsRUs Case Study 4-11
Practice 4:1 Identifying Actors 4-12
Introducing Use Cases 4-13
What is a Use Case? 4-14
Identifying Use Cases 4-15
vi
Lesson 6
Objectives 6-2
Domain Object Model 6-4
Class Models 6-6
A Class Diagram 6-7
Class Diagrams Compared to ER Diagrams 6-9
Classes in UML 6-10
UML Class Diagrams - Association 6-11
A Class Is a Blueprint for Objects 6-14
Discovering Classes 6-15
Identifying Classes 6-16
Nouns and Noun Phrases 6-17
Whiteboard and Post-It Notes 6-18
Organizing Classes Spatially 6-19
Removing Synonyms 6-20
Remember the System Boundary 6-21
Demoting Unimportant Nouns 6-22
Brainstorming New Classes 6-23
Additional Filtering Criteria 6-24
Documenting the Domain Model 6-25
Describing Classes 6-26
How Much Detail is Needed? 6-27
Revised List of Supermarket Classes 6-28
What is Left in the Class Diagram? 6-29
Example: Class Descriptions 6-30
Practice 6-1: Identifying Classes 6-31
Identifying Associations 6-33
Summary 6-34
Practice 6-2: Creating the Class Diagram 6-35
vii
Lesson 7
Objectives 7-2
Review of OO Analysis 7-3
Moving into OO Design 7-4
Exploratory Design Activities 7-5
Refining the Design 7-6
Design Artifacts 7-7
OO Analysis or OO Design? 7-8
Example of OOA Versus OOD 7-9
OO Design Map 7-10
Designing Classes and Associations 7-11
Designing for Inheritance 7-13
Designing for Reuse 7-14
Patterns 7-16
What is a Pattern? 7-17
Summary 7-18
Lesson 8
Objectives 8-2
Why Architecture? 8-3
Technical Architecture Issues 8-4
Additional Technical Architecture 8-5
The Project Architect 8-6
Subsystems 8-7
Subsystems and Packages 8-8
Logical Software Architecture 8-9
Packages 8-10
Package Contents 8-11
Referencing 8-12
Package Design 8-13
Service Packages 8-14
Identifying Packages 8-15
Physical Software Architecture 8-16
Hardware Architecture 8-17
Deployment Diagrams 8-18
Software Deployment 8-19
Considering Deployment Options 8-20
A Three-tier Architecture 8-21
Object Persistence 8-22
Database Connectivity 8-23
Object-Relational Mapping 8-24
Persistence Layers 8-25
Summary 8-26
viii
Lesson 9
Objectives 9-2
The Design Model 9-3
Design Classes 9-4
Well-Formed Classes 9-5
Discovering Design Classes 9-6
CRC Cards 9-7
New Classes 9-9
Guidelines For Assigning Class Responsibilities 9-10
Guidelines for Collaborations 9-11
Collaboration Patterns 9-12
Sequence Diagrams 9-13
A Sequence Diagram 9-14
Another Sequence Diagram 9-15
Objects in Sequence Diagrams 9-16
Messages in a Sequence Diagram 9-17
Creating Sequence Diagrams 9-18
Controller Objects 9-19
Looking for Hidden Objects 9-20
Guidelines for Sequence Diagrams 9-21
Practice 9-1: Creating a Sequence Diagram 9-22
Finding Associations 9-23
Naming Associations 9-24
Finding Operations 9-26
Naming Operations 9-27
Guidelines for Operations 9-28
Practice 9-2: Defining Parameters 9-29
Sample Solution 9-30
Summary 9-31
Practice 9-3: Updating the Class Diagram 9-32
Lesson 10
Objectives 10-2
State Definition 10-3
State 10-4
States and Events 10-5
UML State Transition Diagrams 10-6
State Diagramming Notation 10-7
Example: State Transition Diagram 10-8
Identifying States and Events 10-9
Identifying States and Events 10-10
First Cut State Diagram 10-11
State Diagram, Alternative Courses 10-12
Events and Behavior 10-13
Example: Action-Expressions 10-14
Entry and Exit Actions 10-15
Example: Entry and Exit Actions 10-16
Guard Conditions 10-17
Automatic Transitions 10-18
Guarded Automatic Transitions 10-19
Internal Actions 10-20
Self Transitions 10-21
State Variables 10-22
State Box with Regions 10-23
State Transition Table 10-24
Example: State Transition Table 10-25
Summary of Actions 10-26
Activity Diagrams 10-27
Activity Diagram Symbols 10-28
An Activity Diagram 10-29
Summary 10-30
Optional Practice 10-31
Exercise: Sequence Diagram 1 10-32
Exercise: Sequence Diagram 2 10-33
Exercise: Sequence Diagram 3 10-34
Exercise: Sequence Diagram 4 10-35
Answer: State Transition Diagram 10-36
Answer: Missing Events 10-37
xi
Lesson 11
Objectives 11-2
Associations: A Recap 11-4
Object Links 11-5
Collaboration Diagrams 11-6
Links in Collaboration Diagrams 11-7
Designing Associations 11-8
Classifying Relationships 11-9
Association Directionality (Navigability) 11-10
Multiplicity 11-12
Multiplicity Notation 11-13
Class Discussion: Multiplicity Examples 11-14
Implications Of Multiplicity 11-15
Determining Multiplicity 11-16
Class Practice: Multiplicity Exercise 11-17
Class Practice: Sample Solution 11-18
Multiplicity and Collections 11-19
Collections 11-20
Using Collection Classes 11-22
Class Discussion: Which Collection? 11-23
Constraints and Notes 11-24
Association Classes 11-25
Reflexive Associations 11-26
Aggregation in UML 11-27
Aggregation 11-28
Composite Aggregation 11-29
Composite AggregationExample 1 11-30
Composite AggregationExample 2 11-31
Shared Aggregation 11-32
Class Discussion: Shared or Composite? 11-33
Using Composite Aggregation 11-34
Using Shared Aggregation or Association 11-35
The Need to Define Associations 11-36
Summary 11-37
Practice 11-1:Defining Associations 11-38
Practice 11-2:Specifying Associations 11-39
Suggested Solution 11-40
Suggested Solution 2 11-41
xii
Lesson 12
Objectives 12-2
Design Refinement 12-3
Language Support for Classes 12-4
Creating Classes in Java 12-5
Using Classes in Java 12-6
Packages in Java 12-7
Class Specifications 12-8
Class Discussion: Specifying Classes 12-9
Partial Class Specification 12-10
Class Design Checklist 12-11
Designing Operations 12-12
Stereotypes 12-14
Stereotyping Operations 12-16
Attributes 12-17
Designing Attributes 12-18
Designing Attributes for Java 12-19
Constraints 12-20
Designing Attributes 12-21
Encapsulation and Information-Hiding 12-22
Visibility in UML 12-23
Attribute Visibility and Access 12-24
Class Variables and Methods 12-25
Summary 12-26
Practice 12-1: Defining Attributes and Operations 12-27
Lesson 13
Objectives 13-2
What is Inheritance? 13-4
Inheritance in Analysis and Design 13-5
Sample Inheritance Hierarchy 13-7
Inheritance Terminology 13-8
Notation for Inheritance 13-9
Specifying Inheritance in Java 13-10
Finding Inheritance: Specialization 13-11
Finding Inheritance: Generalization 13-12
Abstract Classes 13-13
Alternative Representation 13-15
Abstract Operations 13-16
Abstract Classes and Methods in Java 13-17
xii
xii
xii