What is an Object?
A fancy variable
- stores data
- can perform operations using the data
Every object has a type, or “class”
- analogous to real, integer, etc.
- you define types (classes) as needed to solve your problems
- types differ in the data they hold and the actions they can perform on it
- every object is an “instance of a class”
An class has an interface
- what the object presents to enable its manipulation
- implementation (how it accomplishes its operations) can be hidden
- object is viewed in terms of its “actions” and not its “thoughts”
Inheritance
- different classes can inherit the same interface, but implement it differently to produce different behaviors