Types, Classes, Interfaces
Classes as Types
What does type information tell us about a variable?
- How much memory the value requires (critical when a primitive
type variable is declared or when an object is constructed).
- How the data is represented in memory.
Mostly an internal concern for the methods
within the class.
- What operations are available for it, what methods are defined,
and when it can be used in an expression or as a parameter.
This is the key type information from a
client code perspective.
Abstract Data Type: a model for a data
type that defines the possible values, the set of operations, and
the behavior of those operations.
Alyce Brady, Kalamazoo College