https://chesterli0130.wordpress.com/2012/10/04/four-major-principles-of-object-oriented-programming-oop/
http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-object-oriented-programming/
Encapsulation, Data Abstraction, Polymorphism and Inheritance.
Encapsulation
Encapsulation means that the internal representation of an object is generally hidden from view
http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-object-oriented-programming/
Encapsulation, Data Abstraction, Polymorphism and Inheritance.
Encapsulation
Encapsulation means that the internal representation of an object is generally hidden from view
outside of the object’s definition. Typically, only the object’s own methods can directly inspect or manipulate its fields.
http://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_principles.htm
Hiding the internals of the object protects its integrity by preventing users from setting the internal data of the component into an invalid or inconsistent state. This type of data protection and implementation protection is called Encapsulation.
Abstraction
Abstraction means to focus on the essential features of an element or object in OOP, ignoring its extraneous or accidental properties. The essential features are relative to the context in which the object is being used.
Grady Booch has defined abstraction as follows:
“An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.”
This refers to simplification of the complexity of the problem using a class modeling approach. The basic principle behind abstraction is to hide the complex or unrelated details and keep things simple – an integral part of understanding what is object oriented programming.
3. Inheritance
Inheritance is a way to reuse code of existing objects, or to establish a subtype from an existing object
4. Polymorphism
Polymorphism means one name, many forms. Polymorphism manifests itself by having multiple methods all with the same name, but slightly different functionality.
Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms means the ability to request that the same operations be performed by a wide range of different types of things.
There are 2 basic types of polymorphism.
Overridding, also called run-time polymorphism. For method overloading, the compiler determines which method will be executed, and this decision is made when the code gets compiled.
Overloading, which is referred to as compile-time polymorphism. Method will be used for method overriding is determined at runtime based on the dynamic type of an object.
One interface may be implemented by multiple objects.
http://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_principles.htm
Modularity
Modularity is the process of decomposing a problem (program) into a set of modules so as to reduce the overall complexity of the problem.
Booch has defined modularity as:
“Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.”