Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Object Paradigm Classes – Templates for creating objects

Similar presentations


Presentation on theme: "The Object Paradigm Classes – Templates for creating objects"— Presentation transcript:

1 The Object Paradigm Classes – Templates for creating objects
Includes Behaviors (methods) Includes Data (attributes) Object Paradigm

2 The Object Paradigm Objects – Instances of a class
Defined from a class template Consumes memory Identified with a object reference Has a finite lifespan Object Paradigm

3 The Object Paradigm Encapsulation – How an object performs its duties is hidden from the outside world Methods can be used without the knowledge of the inner workings Inner workings can be modified without impacting use (as long as the interface is unchanged) Object Paradigm

4 The Object Paradigm Association – Relationship between two classes

5 The Object Paradigm Composition – Supports a “part-of” relationship

6 The Object Paradigm Aggregation – Whole/part relationship where the lifetimes of the whole and part are not necessarily bound together Composition – Whole/part relationship where the lifetimes of the whole and part are bound together Object Paradigm

7 The Object Paradigm Inheritance – Defines a “kind-of” relationship. Supports reusing common attributes and methods from a base class to derived classes. “Specialization” Object Paradigm

8 The Object Paradigm Abstract Classes
Do not include implementation code sufficient to instantiate an object Used to define the common data and behavior of the derived classes Very powerful design & maintenance concept Object Paradigm

9 The Object Paradigm Interface – 100% abstract methods
Derived classes must define behavior A class can inherit from many interfaces (pseudo multiple inheritance). Object Paradigm

10 The Object Paradigm Polymorphism – The ability of objects with the same inheritance to perform any given behavior differently Object Paradigm


Download ppt "The Object Paradigm Classes – Templates for creating objects"

Similar presentations


Ads by Google