Objects

 

Why have Objects??

    1. To hide the implementation of on part of the program from other parts
      1. Allows you to easily use someone elses code
      2. Allows you to update part of a program with only limited changes to other parts
    2. Abstract Data Types
      1. An ADT performs some function without displaying an implementation
      2. Example:  Is the dictionary a linked list, a binary tree, or a hash table.

Vocabulary of Objects

    1. Object -- A structure with methods
    2. Method -- A procedure with an implicit argument
    3. Class  -- The type declaration of an object.
    4. Instance -- A single object.
    5. Inheritence -- Deriving a more specalized class from a less specialized class.

What are Objects

Objects are a collection of procedures combined with a collection of methods.  Objects have

Data Protection

Heirarchy

Inheritence is the deriving of more specalized classes from more general classes.
You can add new class variables, new methods, and override old methods.
You can inheret from more than one class in some langauges (C++), sort of do it in other languages (Java), and not do it in yet other languages.