|
Object Oriented Programming
The building blocks of Object-oriented software are objects. An object consists variables that describe the states of
the object and methods that describe the behaviors of the object. Objects interact with each other by sending and
receiving and messages to perform business tasks. In C language and Pascal, units of code are called functions, while
units of data are called structures or data types. Functions that describe behaviors and structures that describe
states are not formally connected in C. OO or object-oriented programming organizes both functions and data structures
into objects.
Java and C++ are most popular OO programming languages.
Principles of OO
Encapsulation OO hides code details within objects - the methods and properties. Variables within objects are private
and can't be directly accessed by other objects. Encapsulation improves the productivity of programming while keeping
logic transparent by hiding implementation details from external objects.
Polymorphism Many different objects may have methods with identical names. A object may have many methods that use
the same method name but different parameters. The major benefit of polymorphism is flexibility in implementation.
Inheritance Objects can inherent properties and methods from other objects (super objects). Inheritance promotes
code reuse and simplify code maintenance.
Related Topics
Operating Systems - Unix, Linux or Windows Relational Database Management Systems (RDBMS)
|