[first slide]
Introduction to Object Oriented Programming
Chapter 11
Replacement and Refinement
Outline
- Adding versus Replacing or Refining
- Two Models - Replacement and Refinement
- Replacement Example - sqrt in Smalltalk
- Preserving is-a
- Documenting Replacement or Refinement
- Replacement in C++ - issues
- Replacement in C++ - class descriptions
- Replacement in C++ - methods
- Replacement in Java
- Replacement in Object Pascal
- Example Declaration in Object Pascal
- Methods have no indication in Object Pascal
- Replacement in Objective-C and Smalltalk
- Refinement
- Refinement in Simula and Beta
- Refinement in C++
- Constructors always do refinement
- Refinement in Object Pascal
- Refinement in Smalltalk, Java and Objective-C
Other Material