Member-only story

Object-Oriented Programming

Akiko Green
4 min readOct 27, 2020

--

First, you’re probably wondering, “What Is Object-Oriented Programming?”, well according to Wikipedia —

Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods).”

Think of OOP as making breakfast! The properties for breakfast would be — eggs, flour, meat, water, coffee-grinds, etc. The methods along with it would be — makeCoffee(), preparePan(), and whiskEggs(). OOP is similar to this because the properties in our object are like the ingredients and the methods are the recipe instructions!

Now, let’s talk about the 4 pillars of Object-Oriented Programming!

4 pillars of history

Encapsulation

the provision of an interface for a piece of software or hardware to allow or simplify access for the user.

In Object-Oriented Programming or OOP, encapsulation is achieved when each object keeps it’s state private, inside a class. Other objects can have access to this object’s state by only calling a list of methods.

Here, the state is not tampered with, and no other class can touch the state. When…

--

--

Akiko Green
Akiko Green

Written by Akiko Green

Software Engineer, Novice Blogger, Indoor Climber and Dog sitting expert 🥰

No responses yet