The OOP Paradigm
Object oriented programming is a concept that was created because of the need to overcome the problems that were found with using structured programming techniques. While structured programming uses an approach which is top down, OOP uses an approach which is bottom up. Traditionally, programming has placed an emphasis on logic and actions.
Object oriented programming has taken a completely different direction, and will place an emphasis on objects and information. With object oriented programming, a problem will be broken down into a number of units. These units are called objects. The foundation of OOP is the fact that it will place an emphasis on objects and classes.
Objects will be defined, and they will interact inside the system in a number of different ways. There are a number of advantages to be found with using the OOP paradigm, and some of these are simple maintenance, an advanced analysis of complicated programs, and reusability. There are a number of programming languages that use OOP, and some of these are Java, C++, and Ada. One concept that you will want to become familiar with is data modeling. Before you can construct an object oriented system, you will first need to find the objects within the system and determine the relationships they have. This process is called data modeling. There are some other OOP terms that you will want to know.
A class is a unit that holds data and functions which will carry out operations on the data. A class will be comprised of three access modifiers. These three modifiers are protected, private, and public. A member that is public can be accessed and inherited. A member that is designated as private cannot be accessed by objects that exist outside the system. In addition to this, it cannot be inherited. While a member who is protected can be inherited, they cannot be accessed by objects which reside outside of the class hierarchy. Another term that you will hear about often in OOP is objects.
An object is a state of class. It can receive and send messages to other objects, and it can handle data. The objects which exist within software are often based off real world objects, and will behave in the same manner. There are two things that are found with all objects that exist in the real world. These two things are behaviors and states. While behaviors and states are found in real world objects, they can also be found in software objects as well. Another OOP concept that you will need to know is a method. A method is a process that is used to handle an object. A method can be public, protected, or private. The visibility of the member will determine how much of it can be seen by outside objects.
Inheritance is an aspect of OOP that allows subclasses to inherit the traits and characteristics of its superclass. The subclass will inherit all members except those that designated as being private. The subclass may have a large number classes from multiple bases, and this concept is called Multiple Inheritance. It is possible for a subclass to use the behavior of the members it has inherited, and it can also add new members as well. There are two powerful advantages that inheritance has, and these are the implementation of abstract data and reusability.
Encapsulation is another important concept that you will need to know. In a nutshell, encapsulation is responsible for shielding the data within a class from outside objects. It will only reveal the functional information. However, the implementation will be hidden. Encapsulation is a concept which promotes modularity, and it is also crucial for hiding information.
Abstraction is an important concept as well. It allows an application to process objects on a general level. It is not connected to the instance of an object. It is excellent for locating patterns that may have a number of different variations. Abstractions are useful because they can create a common identification that can be found within all their subclasses.
This article serves to demonstrate some of the general concepts of OOP. Object oriented programming is a paradigm that has created a revolution within the field of computer programming. If it is used to design programs properly, they will be efficient and easy to expand and maintain.