This unit explores object-oriented programming, one of the most commonly used methodologies of programming. We'll start off by talking about variables and methods, before expanding to classes and objects, and then finally arriving at an object-oriented approach.
Methods: A Conceptual Look
Variables store individual pieces of information in our programs. Methods are chunks of code that accomplish a specific task or procedure. This video explores these two concepts in detail.
What if we had a group of variables that all described the same thing? When you're buying a car, for example, you might have a bunch of variables to store things like make, model, year, color, price, and so on. Is there any way for us to keep those related variables together? (Spoiler alert: Yes, and that's with classes!)
Classes and Objects: A Conceptual Look
This video explores classes and objects, which make up the foundation of object-oriented programming.
Now that we have an understanding of classes and objects, we'll explore how objects can interact with one another and begin our exploration of object-oriented programming.