Skip to main content
What is Object-Oriented Programming?

Learn about Object-Oriented Programming.

Jon Mattingly avatar
Written by Jon Mattingly
Updated over a week ago

NOTE: Learners are introduced to the concept of object-oriented programming (OOP) in the new Bug World app.

Object-Oriented Programming (OOP) is a style of programming that involves structuring code into logical, self-contained objects. Each object has its own responsibilities and characteristics, independent from other objects in the program.

Definition: A style of programming useful for structuring code into logical, self contained objects, similar to how the world works.

Example: OOP mirrors how the world works.

Consider all the parts that are needed to make a car, like lights, wheels, an engine, etc. These parts need to be built together in the most efficient way in order for the car to drive. A car is a collection of objects, and it is also its own object. Similarly, OOP languages (like JavaScript) also have objects that need to work together efficiently in order for code to run.

OOP is an especially useful way of structuring code for large programs, like games! When playing a game, we can manipulate and control specific objects, like a character, without changing everything else. In the Bug World game, learners will put this to the test and use Object-Oriented Programming concepts to modify games.

Application: Object-oriented programming takes something very complicated and simplifies it by breaking it down. Pieces of code are categorized into logical, self-contained ‘objects’ that are each responsible for their own defined set of tasks in a program.

Everything within the Bug World app is Object-Oriented Programming! In the practice levels, learners utilize OOP concepts like classes, subclasses, properties, and functions, to individually modify specific objects in the game. 

Why Use Object-Oriented Programming: Object Oriented Programming makes it easier to control the program by being able to compartmentalize- you can manipulate individual objects without changing everything, adding layers of complexity to the overall program and allows you to create exciting, dynamic programs with a lot of different, moving parts.

Did this answer your question?