Introduction to OOP
Chapter 10: Subclasses and Subtypes:
What is a type?
What do we mean when we use the term
in describing a programming language?
A set of values. (The type int, for example, describes -2147483648 to 2147483647)
A set of operations. (We can do arithmetic on ints, not on booleans).
A set of properties. (If we divide 8 by 5 we are not surprized when the result is 1, and not 1.6).
What about when we consider classes (or interfaces) as a system for defining types?
, Slide 03