CS 4448 - Fall 1998
Object-Oriented Programming and Design
Lecture 1
Course Description
- Office Hours - in ECCS 102 and by appointment.
- How the course will be graded.
- Group interaction for the course.
- Read chapter before class to improve relevance and productivity of
discussions.
- Learn the ability to learn independently, continue your own education.
- Presentation format for the course.
- Other info from the main course web page.
- Get to know everyone.
- What people expect to get out of this class?
Chapter 1 - OO Design
- Why OO?
- been around for years - Computer Arch., Engr.
- current systems require...
- reusability - well defined methods/interface, object has been
tested, and is well commented
- rapid prototyping
- localization of changes and debugging, black box design approach
- reliability, effect by the above.
- what is in a name (variable/instance and class)?
- Iterative Process
- OO Analysis - real world, computer contrived(legacy systems)
- OO Design - map algorithms and processes to objects
- OO Programming - select a programming language that fits the
design...
- Alan Kay in 1977, one of the creators of Smalltalk, found it easier for
children to learn Smalltalk then computer professionals.
- OO is a new Paradigm in computers instead of imperative
(Pascal,C), functional (FP, Haskell), and logic (Prolog). Sapir and
Whorf mentioned in 1956 that language we speak directly influences the
way we view the world.
- Eskimos Inuit Language and the different types of snow.
- What is OO? X is good, OO is good, ergo, X is OO (Stroustrup
1988). Roger King in 1989 claimed his cat was OO. A cat exhibits
characteristic behavior, responds to messages, is heir to along
tradition of inherited responses, and manages its own quite
independent internal state.
- What is an object? Fig 1.2 - class vs. instance
- OO Data vs Abstract Data Types
- Booch-93 notation with State, Behavior, and Identity Fig 1.3
- Class definition in Fig 1.4 - data, methods, etc..
- Object Model - collection of objects interacting and having
relations. Objects perform computation by communicating with each
other, requesting that other objects perform actions. See Fig 1.6.
- Association - relationship has yet to be determined
- Composition - has-a
- User - use-a
- Inheritance - is-a (parent class - base or superclass, child
class - derived or subclass). Infinite Regression is avoided by
OO/imperative languages by using the imperative language as the base
while pure OO uses "primitive" or "native" operations.
- OO - Modularity, Encapsulation, Abstraction
- Design Hierarchy - Common Characteristics (reduces redevelopment,
testing, validation, and integration time), Data Dependencies through
abstraction, Customization via inheritance. ex:
Flo->Florist->Shopkeeper->Human->Mammal->Animal->MaterialObject->Object
- Language - Typing - Smalltalk (none) vs. C++
- Distributed - Concurrency, Persistence
- Polymorphic Interface Fig 1.8 - Abstract class and derived concrete class
- Booch-93 notation
- Static and Dynamic Models - Fig 1.17
- Module Diagram - Fig 1.18 - high-level view of system - partitions
system into subsystems with modules.
- Category Diagram Fig 1.19 - high-level organization into
categories with using and global relationship
- Class Diagram - Fig 1.15 - detailed view with relationships between
classes.
- Containment - Fig 1.20 - internal and external types of containment
- Cardinality
- Property - 4 types - A(bstract) class used for derivation but not
instantiation, F(riend) try to avoid since results in coupling and
eliminates modularity , V(irtual) useful for multiple inheritance and
more in C++, S(tatic) useful for efficiency.
- Export Controls - Fig 1.24 - public, protected, private, implementation
- State Transition Diagram - Fig 1.21 - events/conditions/actions
- Interaction Diagram - Fig 1.22 - trace of events/operations
between objects
- Object Diagram - Fig 1.23 - like Interaction Diagram with
additional detail.
- Function Hierarchy - Fig 1.24 - detail of which methods use each other
Adam Jonathan Griff,
computer@griffmonster.com
Copyright © University of Colorado. All rights reserved.
Revised: August 24, 1998