Object-Oriented Programming (OOP) languages, like JavaScript and Python, organize software design around data that is formatted in objects, rather than function or logic. First, I’ll cover the basics: objects, classes, instance, and methods. Then, I’ll briefly explain the four main pillars of OOP design: Encapsulation, Abstraction, Inheritance, and Polymorphism. Objects An object is data formatted to represent a real-world object that has a state and behavior. Picard’s state would be “wants to set a course” and his behaviors would be telling an ensign the desired course and to “Make it so.” Classes Different programming languages go about this in different ways, but essentially a class is a blueprint for creating an object. Instance Any time an object is created it is instantiated. Each deskSponge shown here would be an instance of an object and because they’re made with the class, an instance of . Spongebob Spongebob Methods Methods are functions within an object. In other words, our object’s behaviors. The coffee machine above would have a method for making coffee and the button would call it. The office worker would have a method for pushing the button, drinking the coffee, and caffeinated typing. Encapsulation You don’t need to know how the coffee machine works to press the button and get coffee. In other words, the behavior and state of the object in question should be private and only affected by private methods within the object. (The person who pressed the button doesn’t see the water being heated and pushed through the coffee grounds.) The object should have public methods that other objects can use to interact with it (like the button). Abstraction The only information about an object that is available outside the object is information absolutely necessary for other objects to use it.  This is also referred to as , and the public methods made available for other objects are “getters” and “setters.” information hiding Inheritance Just like genetics — if a class was a dog and each object inheriting from the dog class was a puppy. Objects made with a class (JavaScript uses the keyword ) inherit the information and methods of the super (or parent) class (calling in the in a JavaScript object). extends super() constructor Polymorphism and both have a method called . When is called, will put on his ascot, and will put on his ghost costume. Fred ghostFred getDressed() getDressed() Fred ghostFred In this case, is the class, and is an object that extends . inherits the method from , but when is instantiated, the programmer passes different arguments to and/or changes the method’s code. Fred ghostFred Fred ghostFred getDressed() Fred ghostFred getDressed() The OOP language evaluates which to use based on which object is being referenced when it is called (the object the keyword would refer to). Used correctly, this can significantly cut down on repeated code. Conclusion getDressed() this If you’re an experienced developer, hopefully you got a chuckle out of this. If you’re a beginner, I hope it helps you use an OOP language more confidently! If you enjoyed this high-level overview of OOP in memes or it left you with more questions, leave a comment! Also published here.