Let's take a moment to talk about object-oriented programming. OOP, as object-oriented programming is often abbreviated, is a design idea for organizing a program's code. Instead of creating a long list of line after line of code that defines the entire program all at once, we break it into pieces. For example, one of these code pieces might be all of the code that controls the player character in the game. Another might be the code for a menu. Because we break the program apart along these logical lines that pertain to objects within the program we refer to them as objects as well. That's where object-oriented programming gets its name.
We break the program apart by using classes. A class is a grouping of code that defines a type of object in the program, and it can be reused multiple times. Within a class we put the code that stores the values for the object and the code that makes the object perform whatever duties it needs to perform. A character class may contain...