| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
| |
What Does It Mean to Be Object Oriented, Anyway? | |
| |
| |
| |
Encapsulation | |
| |
| |
| |
Information/Implementation Hiding | |
| |
| |
| |
State Retention | |
| |
| |
| |
Object Identity | |
| |
| |
| |
Messages | |
| |
| |
| |
Message structure | |
| |
| |
| |
Message arguments | |
| |
| |
| |
The roles of objects in messages | |
| |
| |
| |
Types of message | |
| |
| |
| |
Classes | |
| |
| |
| |
Inheritance | |
| |
| |
| |
Polymorphism | |
| |
| |
| |
Genericity | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
A Brief History of Object Orientation | |
| |
| |
| |
Where Did Object Orientation Come From? | |
| |
| |
| |
Larry Constantine | |
| |
| |
| |
O.-J. Dahl and K. Nygaard | |
| |
| |
| |
Alan Kay, Adele Goldberg, and others | |
| |
| |
| |
Edsger Dijkstra | |
| |
| |
| |
Barbara Liskov | |
| |
| |
| |
David Parnas | |
| |
| |
| |
Jean Ichbiah and others | |
| |
| |
| |
Bjarne Stroustrup | |
| |
| |
| |
Bertrand Meyer | |
| |
| |
| |
Grady Booch, Ivar Jacobson, and Jim Rumbaugh | |
| |
| |
| |
Object Orientation Comes of Age | |
| |
| |
| |
Object Orientation As an Engineering Discipline | |
| |
| |
| |
What's Object Orientation Good For? | |
| |
| |
| |
Analyzing users' requirements | |
| |
| |
| |
Designing software | |
| |
| |
| |
Constructing software | |
| |
| |
| |
Maintaining software | |
| |
| |
| |
Using software | |
| |
| |
| |
Managing software projects | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
The Unified Modeling Language | |
| |
| |
| |
Basic Expression of Classes, Attributes, and Operations | |
| |
| |
| |
The Class | |
| |
| |
| |
Attributes | |
| |
| |
| |
Operations | |
| |
| |
| |
Overloaded Operations | |
| |
| |
| |
Visibility of Attributes and Operations | |
| |
| |
| |
Class Attributes and Operations | |
| |
| |
| |
Abstract Operations and Classes | |
| |
| |
| |
The Utility | |
| |
| |
| |
Parameterized Classes | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Class Diagrams | |
| |
| |
| |
The Generalization Construct | |
| |
| |
| |
Single inheritance | |
| |
| |
| |
Multiple inheritance | |
| |
| |
| |
Subclass partitioning | |
| |
| |
| |
Partitioning discriminators | |
| |
| |
| |
The Association Construct | |
| |
| |
| |
The basic UML notation for associations | |
| |
| |
| |
Associations depicted as classes | |
| |
| |
| |
Higher-order associations | |
| |
| |
| |
Navigability of associations | |
| |
| |
| |
Whole/Part Associations | |
| |
| |
| |
Composition | |
| |
| |
| |
Aggregation | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Object-Interaction Diagrams | |
| |
| |
| |
The Collaboration Diagram | |
| |
| |
| |
Depicting a message | |
| |
| |
| |
Polymorphism in the collaboration diagram | |
| |
| |
| |
Iterated messages | |
| |
| |
| |
Use of self in messages | |
| |
| |
| |
The Sequence Diagram | |
| |
| |
| |
Asynchronous Messages and Concurrent Execution | |
| |
| |
| |
Depicting an asynchronous message | |
| |
| |
| |
The callback mechanism | |
| |
| |
| |
Asynchronous messages with priority | |
| |
| |
| |
Depicting a broadcast (nontargeted) message | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
State Diagrams | |
| |
| |
| |
Basic State Diagrams | |
| |
| |
| |
Nested States | |
| |
| |
| |
Concurrent States and Synchronization | |
| |
| |
| |
Transient States from Message-Result Arguments | |
| |
| |
| |
Continuously Variable Attributes | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Architecture and Interface Diagrams | |
| |
| |
| |
Depicting System Architecture | |
| |
| |
| |
Packages | |
| |
| |
| |
Deployment diagrams for hardware artifacts | |
| |
| |
| |
Deployment diagrams for software constructs | |
| |
| |
| |
Depicting the Human Interface | |
| |
| |
| |
The window-layout diagram | |
| |
| |
| |
The window-navigation diagram | |
| |
| |
| |
A brief digression: What's object oriented about a GUI? | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
The Principles of Object-Oriented Design | |
| |
| |
| |
Encapsulation and Connascence | |
| |
| |
| |
Encapsulation Structure | |
| |
| |
| |
Levels of encapsulation | |
| |
| |
| |
Design criteria governing interacting levels of encapsulation | |
| |
| |
| |
Connascence | |
| |
| |
| |
Varieties of connascence | |
| |
| |
| |
Contranascence | |
| |
| |
| |
Connascence and encapsulation boundaries | |
| |
| |
| |
Connascence and maintainability | |
| |
| |
| |
Connascence abuses in object-oriented systems | |
| |
| |
| |
The term connascence | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Domains, Encumbrance, and Cohesion | |
| |
| |
| |
Domains of Object Classes | |
| |
| |
| |
The foundation domain | |
| |
| |
| |
The architecture domain | |
| |
| |
| |
The business domain | |
| |
| |
| |
The application domain | |
| |
| |
| |
The source of classes in each domain | |
| |
| |
| |
Encumbrance | |
| |
| |
| |
What is encumbrance? | |
| |
| |
| |
The use of encumbrance | |
| |
| |
| |
The Law of Demeter | |
| |
| |
| |
Class Cohesion: A Class and Its Features | |
| |
| |
| |
Mixed-instance cohesion | |
| |
| |
| |
Mixed-domain cohesion | |
| |
| |
| |
Mixed-role cohesion | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
State-Space and Behavior | |
| |
| |
| |
State-Space and Behavior of a Class | |
| |
| |
| |
The State-Space of a Subclass | |
| |
| |
| |
The Behavior of a Subclass | |
| |
| |
| |
The Class Invariant as a Restriction on a State-Space | |
| |
| |
| |
Preconditions and Postconditions | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Type Conformance and Closed Behavior | |
| |
| |
| |
Class versus Type | |
| |
| |
| |
The Principle of Type Conformance | |
| |
| |
| |
The principles of contravariance and covariance | |
| |
| |
| |
An example of contravariance and covariance | |
| |
| |
| |
A graphic illustration of contravariance and covariance | |
| |
| |
| |
A summary of the requirements for type conformance | |
| |
| |
| |
The Principle of Closed Behavior | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
The Perils of Inheritance and Polymorphism | |
| |
| |
| |
Abuses of Inheritance | |
| |
| |
| |
Mistaken aggregates | |
| |
| |
| |
Inverted hierarchy | |
| |
| |
| |
Confusing class and instance | |
| |
| |
| |
Misapplying is a | |
| |
| |
| |
The Danger of Polymorphism | |
| |
| |
| |
Polymorphism of operations | |
| |
| |
| |
Polymorphism of variables | |
| |
| |
| |
Polymorphism in messages | |
| |
| |
| |
Polymorphism and genericity | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Techniques for Organizing Operations | |
| |
| |
| |
Mix-In Classes | |
| |
| |
| |
A business example | |
| |
| |
| |
A graphics example | |
| |
| |
| |
Rings of Operations | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Class Cohesion and Support of States and Behavior | |
| |
| |
| |
State Support in a Class Interface | |
| |
| |
| |
Behavior Support in a Class Interface | |
| |
| |
| |
Operation Cohesion in a Class Interface | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Designing a Software Component | |
| |
| |
| |
What Is a Component? | |
| |
| |
| |
Similarities and Differences Between Components and Objects | |
| |
| |
| |
Example of a Component | |
| |
| |
| |
Internal Design of a Component | |
| |
| |
| |
Lightweight and Heavyweight Components | |
| |
| |
| |
Advantages and Disadvantages of Using Components | |
| |
| |
| |
Summary | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers | |
| |
| |
| |
Checklist for an Object-Oriented Design Walkthrough | |
| |
| |
| |
The Object-Oriented Design Owner's Manual | |
| |
| |
| |
The Blitz Guide to Object-Oriented Terminology | |
| |
| |
Glossary | |
| |
| |
Bibliography | |
| |
| |
Index | |