OBJECT-ORIENTED PROGRAMMING

Tomilayo Jesse
5 min readDec 3, 2020

Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define the data type of a data structure, and also the types of operations (functions) that can be applied to the data structure.

In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.

The Basic OOP Concepts

If you are new to object-oriented programming languages, you will need to know a few basics before you can get started with code. The following Wikipedia definitions will help you better understand object-oriented programming:

  • Abstraction: The process of picking out (abstracting) common features of objects and procedures.
  • Class: A category of objects. The class defines all the common properties of the different objects that belong to it.
  • Encapsulation: The process of combining elements to create a new entity. A procedure is a type of encapsulation because it combines a series of computer instructions.
  • Information hiding: The process of hiding details of an object or function. Information hiding is a powerful programming technique because it reduces complexity.
  • Inheritance: a feature that represents the “is a” relationship between different classes.
  • Interface: the languages and codes that the applications use to communicate with each other and with the hardware.
  • Messaging: Message passing is a form of communication used in parallel programming and object-oriented programming.
  • Object: a self-contained entity that consists of both data and procedures to manipulate the data.
  • Polymorphism: A programming language’s ability to process objects differently depending on their data type or class.
  • Procedure: a section of a program that performs a specific task.

Advantages of Object Oriented Programming

One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.

Example of Languages used in Object Oriented Programming:

Java, C++, C#, Python, PHP, JavaScript, Ruby, Perl, Objective-C, Dart, Swift, Scala.

Languages used in Procedural Programming:

FORTRAN, ALGOL, COBOL, BASIC, Pascal and C.

Where Object-Oriented Programming is applied:

OOP is most demandable because of writing sizeable and composite software. Due to its wide range, it has many applications. Some of the applications are discussed below.

1. Real-Time Systems Design

A system is said to be Real-Time if it is required to complete its work and delivers its services on time i.e Flight Control System etc. Object-oriented techniques make it easier to control the complexities related to real-time system design. These techniques give an integrated framework which involves the schedulability analysis and developmental specifications.

It has two main types

  • Hard Real-Time System: Purely deterministic and 100% time constraint system i.e Satellite launching stations, Missile launching stations and Air Bags Controls in cars etc.
  • Soft Real-Time System: The meeting of the deadline is not compulsory for every time or for every task but the process should be processed and give the result i.e personal computers, audio, and video systems etc.

2. Simulation and Modelling System

The varying specification of variables makes it difficult to build complex systems such as ecology, zoology, and agronomic systems. Modeling and understanding interactions explicitly are required for simulating complex systems. Object-oriented Programming gives the substitute approach for making these complex modeling systems easier.

3. Object-Oriented Database

The object-oriented database enables us to represent data in the form of objects. It permits developers to model complex data easily and captures the relationships in a natural way. It is also known as Object Database Management Systems (ODBMS). To let the object maintain their identity and integrity, these databases try to balance a relationship between the real-world and database objects. Identities of objects are identified and operations are then performed on these objects.

4. Client-Server System

A client-server is a software structural design model comprises of client systems and server systems, both of which communicate over a computer network or may communicate on the same computer. Because of object-oriented programming, Client-Server Systems offer the IT infrastructure i.e operating systems, networks, and hardware, etc, creating object-oriented Client-Server Internet (OCSI) applications.

These applications have three major technologies:

  • The Client Server
  • Object-Oriented Programming
  • The Internet

These models have also structural functionality for email exchange and Web/database access.

5. Hypertext, Hypermedia

Hypertext means text augmented with links. OOP also helps in laying out a framework for Hypertext which is suitable for various media approaches. Hypertext is basically similar to that of regular text as it can be stored, searched, and edited effortlessly. The main disparity is that hypertext is text with pointers to other text as well.
Hypermedia is an extension to hypertext that gives facilities like handling sound and video. It’s a superset of hypertext. Documents having hypermedia, not only have links to other pieces of text but also to various other forms of media, varies from images to sound.

6. Neural Networking And Parallel Programming

It is very useful in addresses the setback of prediction and estimation of complex time-varying systems. Firstly, the whole time-varying process is divided into numerous time intervals. Then, neural networks are developed in a specific time interval to scatter the load of several networks. OOP simplifies the whole process by simplifying the estimation and prediction capability of networks.

7. Office Automation Systems

These involve formal and informal electronic systems mainly concerned with information sharing and communication to and from people inside as well as external of the association i.e email, Word processing, Web calendars, Desktop publishing, etc.

8. CIM/CAD/CAM Systems

OOP can also be used in developing and designing the applications as it allows people to trim down the effort involved. Such as, it is used in designing blueprints, flowcharts, etc. OOP makes it easier for the designers and engineers to produce these flowcharts and blueprints perfectly.

9. AI Expert Systems

These are computer applications which use databases of expert knowledge to make decisions in many areas as medical diagnosis. Their advice and decisions are beyond the reach of a human brain as they are reliable, highly responsive and understandable.

Difference between Procedural Programming and Object Oriented Programming:

  • In procedural programming, program is divided into small parts called functions, while In object oriented programming, program is divided into small parts called objects.
  • Procedural programming follows top down approach but Object oriented programming follows bottom up approach.
  • There is no access specifier in procedural programming. Object oriented programming have access specifiers like private, public, protected etc.
  • in procedural programming, Adding new data and function is not easy, while in OOP, Adding new data and function is easy.
  • Procedural programming does not have any proper way for hiding data so it is less secure. Object oriented programming provides data hiding so it is more secure.
  • In procedural programming, overloading is not possible. Overloading is possible in object oriented programming.
  • In procedural programming, function is more important than data. In object oriented programming, data is more important than function.

What is Meta-programming?

Meta-programming is a programming technique in which computer programs have the ability to treat other programs as their data. It means that a program can be designed to read, generate, analyze or transform other programs, and even modify itself while running.

In some cases, this allows programmers to minimize the number of lines of code to express a solution, in turn reducing development time. It also allows programs greater flexibility to efficiently handle new situations without recompilation.

--

--