Introduction to OOP: Chapter 10: Subclasses and Subtypes [next] [previous] [audio] [real] [text]

Static and Dynamic classes

We say the class of the declaration is the static class for the variable, while the class of the value is the dynamic class of the variable.

Even statically typed OOP languages permit these two to differ.

	pet : Mammal;
	fido : Dog;
	felice : Cat;
	pet := fido;	// legal
Intro OOP, Chapter 10, Slide 6