CS 4448 - Spring 1998
Object-Oriented Programming and Design
Lecture 3.2
Chapter 3
C++
- Classes
- Types
- Precedence of operations - * and / then + and -
- () vs. {}
- Comments - // and /* */
- Constructor ClassName(...) 3 types - P69 Many
- Destructor ~ClassName(...) only one
- Data storage for an instance
- access levels and inheritance levels (public, protected, private)
P. 79
- Type of functions - P64. - access, processing, utility,
constructors, destructors. Put comments to seperate categories, nice
idea.
Smalltalk
- Not typed, how did this effect HW#2
- Precedence for evaluation - (), Unary, Binary, keyword
- Evaluation is left to right.
- () vs []
- Comments - " "
- Constructor new and many more
- Destructor what? Automatic Garbage Collection
- Literal Objects
- Cascaded Messages using ;
- Classes are factories for creating instances
- self and super
Adam Jonathan Griff,
computer@griffmonster.com
Copyright © University of Colorado. All rights reserved.
Revised: January 29, 1998