Miscellaneous topics
- Object types:
- atomic data type
- constructed data type
- reference data type
- Notion of object equality
- two objects are
- deep equal, if they have the same value
- shallow equal, if they refer to the same object
- two objects are equal if
- the objects are of atomic type and have the same value, or
- the objects are of reference type, and the equals operator is true for the
two referenced objects
- the objects are of constructed type, the equals operator is true for the
corresponding subparts of the two objects
- shallow equal: have the same Oid
- Method binding:
- overloading of methods: two methods working differently for different objects
- Example: display() works differently for jpeg_image and polygon
- early binding: binding of method to object at parsing time
- late binding: binding of method to onbbject at runtime