OBJECT-ORIENTED MODEL MAJOR Elements: 1. Abstraction 2. Encapsulation 3. Modularity 4. Hierarchy MINOR Elements: 5. Typing 6. Concurrency 7. Persistence OBJECT DEFINITION 1. Has State 2. Is Characterized by its Operations (Methods) 3. Is a Unique Instance of some Class 4. Is Denoted by a Name 5. Has Restricted Visability 6. Can be viewed by either its Specification or Implementation OBJECT CLASSIFICATION 1. Actors 2. Servers 3. Agents OPERATION (METHOD) CLASSIFICATION 1. Modifier 2. Selector 3. Iterator 4. Constructor 5. Destructor CLASS DEFINITION "A Class is a set of Objects that share a common structure and a common behavior." Parts of a CLASS 1. Public ( Ada, C++, Object Pascal, Smalltalk, CLOS, etc. ) 2. Protected ( C++ ) 3. Private ( Ada, C++, Smalltalk, CLOS, etc. ) GENERAL CLASS RELATIONSHIPS 1. Generalization 2. Aggregation 3. Association PROGRAMMING LANGUAGE APPROACHES TO CLASS RELATIONSHIPS 1. Inheritance 2. Using 3. Instantiation 4. Metaclass INHERITANCE 1. Subclasses & Superclasses 2. Clients : Instances & Subclasses 3. Abstract Classes 4. Single 5. Multiple 6. Repeated USING 1. Interface 2. Implementation 3. Cardinality -- 1 : n or m : n INSTANTIATION Templates and Generics METACLASS RELATIONSHIPS BETWEEN CLASSES and OBJECTS 1. Every Object is an Instance of Some Class 2. Classes are Static 3. Objects are Dynamic CLASSES and OBJECTS in ANALYSIS and EARLY DESIGN STAGES 1. Must Take the "Outside" View 2. Identify the KEY ABSTRACTIONS of the Problem 3. Invent the MECHANISMS of the Implementation FUNCTIONAL SEMANTICS 1. Reusability 2. Complexity 3. Applicability 4. Implementation Knowledge TIME AND SPACE SEMANTICS (Only Necessary When Concurrency Present) CLASSES and OBJECTS in LATER DESIGN STAGES 1. Must Take the "Inside" View 2. Representation 3. Packaging NAMING KEY ABSTRACTIONS (by "Convention") 1. Objects => proper noun phrases shape theSensor the_sensor 2. Classes => common noun phrases Sensors Shapes 3. Modifier Ops => active verb phrases draw moveLeft Move_Left 4. Selector Ops => "to be" verbs isOpen extent_of OOA/OOD ADVANTAGES 1. Reuse 2. Reduces Change Impact 3. Reduces Development Risk 4. Human Cognition 5. Exploits OO Languages OOA/OOD DISADVANTAGES 1. Start-up Costs 2. Reuse Costs 3. Performance Considerations