The 3 Pillars of Object-Oriented Programming (OOP) Brought Down to Earth
Object-oriented programming (OOP) is an important foundation for all aspiring software developers. In our Tech Elevator coding bootcamps, we teach an object-oriented, full-stack web development curriculum. While we use Java based on overall industry demand and feedback from our hiring partners, most programming languages today are object-oriented, so the underlying principles and skills apply to almost all software development jobs.
In this post, I’ll share a slide and information that I shared during a review session with students learning Java at Tech Elevator. My goal was to teach them the core pillars of object-oriented programming.
Object-Oriented Programming, Explained (Plus, How It’s Used on the Job)
Object-oriented programming refers to the practice of defining classes and objects to organize code, and is used in most programming languages today. OOP is valuable because it makes software development more efficient by promoting reusable and maintainable code, which can lead to more scalable, flexible, and secure software solutions.
There are three major pillars on which object-oriented programming relies: encapsulation, inheritance, and polymorphism.
Here’s a helpful slide that breaks each pillar down:

If you are not familiar with the three pillars of OOP (object-oriented programming), let me explain a bit more what the terms mean.
- Encapsulation
This is the idea of wrapping everything up about a particular thing, whether a Checking Account or Armadillo, into a defined object with features and behaviors. Once we do, we can ask the object itself to do what it is supposed to do, whether that is Deposit Money or Defend Yourself. But nobody outside the object needs to worry about how it does its job. We just tell it to do it and go about our day. If everybody, and by this I mean every object, simply minds its own business and stays out of the business of other objects, all is good with the world. - Inheritance
This is the idea that we don’t have to define absolutely everything about an object over and over again if it shares features and behaviors with other objects. We can define a class for Accounts and then let our Checking Account or Savings Account inherit all the stuff in common. Likewise, we can define a class for Animals, and let our Armadillo inherit features like Number Of Legs and Weight as well as behaviors such as Breathe and Sleep. We call these overarching classes parent classes, and the ones that inherit from them, child classes. We can then inherit from the child classes and so on. But our Checking Account is more specialized than our Accounts because we can Write A Check, which we can’t do with a Savings Account. Our Armadillo can Roll Into A Ball, but other animals, such as a Giraffe, don’t have that behavior. Since we go from more general to more specialized, I like to say that a child is like its parents, but much more special. - Polymorphism
This fancy name just means that we can treat the same object as different things depending on how we need it at different times, and we can treat groups of different objects that share an ancestor or trait as if they were that ancestor or trait. So, we could have a set of different Checking, Savings, and Credit Accounts and ask each to Get Balance so we can figure out how much we have to spend on vacation this year. Or we could ask a queue of animals to Move Quickly, and not care how the Porpoise or Eagle or Armadillo would handle that shared behavior. I like to think that we are different things to different people, so even if not every Dungeon Master has a spouse to think him or her a nuisance, we can ask any of them to organize a game for Saturday night.
Interested in learning how to code? Read about our full-time and part-time coding bootcamps for beginners!
—–
Ben Langhinrichs
Ben has been developing software in a variety of languages and environments for many years. He has focused, in recent years, on high-performance middleware services using C++ and Java, and data transformation code used to drive large-scale web applications. Ben enjoys teaching and inspiring others.