Main Menu

Our Partners


Authorized Pearson Vue Test Center



TESDA
Live Online Training


Live CCNA Remote lab

Contest

  

CNCTC Articles - Excellence in IT TRAINING

What is Object-Oriented Programming?

by: Kenneth Tello | 17 Nov, 2010 13:25:05

Article Word Count: | Viewed: times


Structured programming became the paradigm for most programming languages developed over the past 2 decades as implemented in C, Pascal and COBOL. The concept of structured or procedural programming is simple: the instructions or processes are executed on a “top down” fashion. Above instructions get executed first going downward. While procedural programming was proven to yield desired outputs and solved small to medium scale programming problems, this programming paradigm has its limitations in building large software systems; coding using this technique produces an inflexible program structure and code reuse is nearly impossible in structured programming.

The solution to the limitations of structured programming was a new programming paradigm, known as the object-oriented programming (OOP). As its name suggests, object-oriented programming is a paradigm that uses a new form of data structure called objects. Object is a self-contained data structure composed of data and operations or methods on the data. Unlike structured programming in which program is viewed as a list of instructions to execute, object-oriented program is viewed as a collection of collaborating objects capable of receiving values or messages from other objects, passing values to other objects and data processing. Indeed object can be thought of as an “independent” machine having unique responsibility.

Object oriented programming languages are languages that support object oriented programming concepts. Popular programming languages used by developers include C++, Java Visual Basic, PHP and more. But what makes these languages an object-oriented programming language?  Well a programming language is object oriented if it has support to all the following programming concepts:

Object

Object is the basic entity in OOP. It is the key to understand object oriented programming paradigm. In an enrollment system for example, student entity is an example of an object.

Basically an object has two characteristics: state and behavior.

  • State – state describes the object. In our enrollment system example, student object is being identified by the following states: student number, name, course etc. State is also known as properties or attributes.
  • Behavior – or method, describes the possible actions or behavior of an object. In our student example, one method for student in an enrollment system would be register or evaluate subjects.

Class

Class is the basic structure in object oriented programming; it is the blueprint of every object created. Class is a user-defined data type consisting of data (attributes) and methods defining the characteristics of the object. An object is an instance of a class. Using the advantage of reusability, programmers can create many objects out of a single class without repeatedly writing the code.

Instance

A copy of an object created at run-time. Instantiation of an object normally calls the constructor method of the class. Many OOP languages use the keyword new to create an instance of an object.

Inheritance

Inheritance is a mechanism in which one class acquires or “inherits” the state and behavior of the other class. The class where the properties are being inherited is called the parent class or “super class”, where the class that inherits the properties of the other class is called the child class or “subclass”. In C++, you can inherit properties of one class using the colon symbol. In Java, you can use inheritance by placing the keyword extends after the class name.

Polymorphism

OOP mechanism allowing an object to assume many forms (poly means “many” and morph means “form”). In our example, Student object could be Regular Student or Irregular Student.

Encapsulation

Encapsulation is a mechanism in which the design and implementation not relevant to the object is hidden from the object. In our enrollment system example, Student object has the method register(), Student knows that he/she needs to register(), however Student does not need to know how he /she needs to register(). The register() process is hidden from the Student object.

Data Abstraction

Is a mechanism separating data type’s logical properties from its implementation. Abstract data type is an implementation of data abstraction.

Dynamic Binding

In OOP, the method to call for the particular object will be determined until runtime. This is the main advantage of OOP over structured programming.

A programming language supporting all these mechanisms is categorized as an object oriented programming language.


Protected by Copyscape Originality Checker





Other Related Topics..
« Prev item - Next Item »
---------------------------------------------


What do you think?

Leave comment

This item is closed, it's not possible to add new comments to it or to vote on it

Comments

No comments yet. You can be the first!

  
CNCTC Live Chat Inquiry

Subscribe

Stay Informed Subscribe

Name *

Email *