Object Oriented Programming Primer

This primer started out as a paper I wrote for a class for extra credit. The assignment was to explain how Object Oriented Programming(OOP) works to an audience who are unfamilar with OOP in general. I feel like sharing this paper could help others understand how OOP and its principles work when building programs, in terms that abstract knowing a specific coding language, and just understanding OOP as a general software engineering concept. The paper is almost five pages long, so I will be breaking it up to different sections dependening on the OOP principle that is being conveyed. Hopefully this series of guides can help others understand why OOP is so important in software engineering, and how understanding the overall concept of OOP is an integral part of becoming a better engineer.

As always, if there are any comments please feel free to email me.

Object-Oriented Programming

Object-Oriented Programming (OOP) is a programming paradigm where data types known as “Objects” are initialized, where each Object has its own set of primitive data properties and its own set of functions called methods. These “Objects” are then used within a program to handle the flow of instructions and data within the program in a way that is streamlined for the programmer but keeps the various underlying functions of the program away from the end-user. OOP takes into consideration how we as humans interact with objects (people, places, things), and how we use them.

An example of this would be a Car, we don’t know how the underlying mechanisms of driving a car works, but we know that if we press on the gas pedal, the car will start to drive. If we are looking at this from an OOP perspective, pressing the gas pedal is the function that outputs the car to drive, going further we can say that the input of the gas pedal function is the amount of force that we use to press the gas pedal. The more force we use to press the gas pedal, the faster the cargoes. This however is one of the many different ideas behind the OOP paradigm, but generally, there are 4 principles that stand out to truly define OOP: Abstraction, Polymorphism, Inheritance, and Encapsulation. These four principles work together in conjunction to create the OOP paradigm, the most commonly used programming paradigm, today.

Written on March 4, 2023