Monday, April 23, 2012
Object Oriented Programming
Object - Is data grouped with it’s methods.
Class - Is the framework of an object. There are two levels to an object, the object itself and it’s class instance, with data and methods possible at each level.
Interface - Is the contract that an object has with it’s callers.
Package - A code module, with it’s own name space
Inheritance - The way you can reuse an existing class while extending it’s functionality for a more specific case.
Encapsulation - not allowing anything outside the objects methods direct access too an objects data.
Basically with object oriented programming you create an interface that groups functions, state and data together as a single unit. The interface should do only one thing, but should do it well. Since the interface is very simple and is only performing a fixed set of functions it is easy to test the interface, and to reuse the interface in other places.