Wizard header

Welcome to Lesson 1

Your journey to learning OOP Fundamentals begins here! In this lesson, Steve breaks down Objects and Classes by creating a character for a massively multiplayer online role playing game, or MMORP for short.

You'll learn about:

  • the relationship between objects and classes
  • the elements that make up a class
  • how to create an object

Make your own character

Instances of a class are made by sending data to a class during instantiation. This data contains information on what things your object has, or properties and what your object does, or behaviors. Choose a character below and create your own properties and methods. Click on the properties to change how your character looks, and choose a weapon for your attack behavior. Don't forget to click "CREATE" to instanitate your instance!

Let's Recap.

A lot of new terms were presented in this lesson. Have a look before you take the quiz!


CLASS

A class in OOP is a template that describes one or more objects. It serves as a template for creating, or instantiating, specific objects within a program. We created character classes to be the template for the character objects with varing types of properties and methods, such as clothes color and attack weapons.


BEHAVIOR

Behaviors, or methods, determine what type of functionality a class has. With behaviors, we can determine how an object will act in our game. We created an attack behavior for our character that takes in a specific weapon.


PROPERTY

A property is a data value of a class that an object will have. We created characters with properties such as skin color, hair color and clothes color. These property values will be passed to an object during the instatntiation process.


OBJECT

An object is a specific instance of a class, containing values declared during the instantiation process. An object can be thought of as a copy of a class. We created character objects ELF, KNIGHT, WIZARD and ORK from their respective character classes. When we created the object, we selected values for properties and behaviors that became a part of our object.


INSTANTIATE

The process of creating an instance of a class. We instantiated an instance of a character class by seleting properties and a behavior, then clicking create.

Test Your Knowledge.

Are you ready to see what you've learned? Take the quiz below to see if your ready to move on to the next lesson!

Take a break - You've earned it!

Before moving onto the next lesson, take some time to think about how you would make your own classes for objects in your projects. What does your object look like? What attributes does it have? What can it do?

Join the OOP Fundamentals forum and join the discussion or ask a question!

Ready for Lesson 2?