Course Content‎ > ‎Session 4‎ > ‎

Intro to OOP

Object oriented programming is an approach to program organization and development, which attempts to eliminate some of the pitfalls of conventional programming methods.  It is a new way of organizing and developing programs and has nothing to do with any particular language. Some of the languages that support OOP features are:

  1. Smalltalk
  2. C++
  3. Ada
  4. Object Pascal
  5. Java

C++ is the most popular OOP language. C++ is basically a procedural language with object-oriented extensions.  Java is the most commonly used OOP language. It is a pure object-oriented language.

Features of Object-Oriented Programming
  1. OOP treats data as a critical element in the program development and does not allow it to flow freely around the system.
  2. OOP ties the data closely to the functions that operate on it and protects it from unintentional modification by other functions.
  3. OOP allows to decompose a problem into a number of entities called Objects and then build data and functions(known as methods in Java)  around these entities. The combination of data and methods make up an object.
  4. The data of an object can be accessed only by the methods of that object. However, methods of one object can access the methods of other objects.
  5. New data and methods can be easily added whenever necessary.
  6. OOP follows bottom-up approach in program design.
In general, the definition of OOP can be stated as:
Object-Oriented Programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as template for creating such modules on demand.