Introduction to OOP: Chapter 20 : A Second Look at Classes
Classes as Types
Some people consider a class as a type - but what is a type?
Set of set of values with common attributes and operations
A set of syntactic constraints on expressions (uses)
A set of invariants that instances of the type must specify
A protective mechanism wrapped around the bits
A description telling us how the bits are stored in memory