The Coder's Handbook
Object Oriented Programming
OBJECTS AND CLASSES
The class defines the categories of data holds, but the data itself will vary from object to object.
CONSIDER AN EXAMPLE...
We could represent an entire chess game with a program like this without displaying an actual grid, simply by using the coordinate system that is used to record chess moves.
In a more robust implementation, the move() method would check if a move is legal. Right now, a Knight could just teleport anywhere.
SCOPE, CONSTRUCTORS, AND THIS
PUBLIC AND PRIVATE
You will learn more about protected once we study inheritance.
Divide your code up like bulwarks in a ship. If each class is sealed up tight, your whole program won't get flooded with bugs.
GETTING TO THE DATA
Coding With John - Constructors
Coding With John - This
Coding With John - Static vs. Nonstatic
Alex Lee - Object Oriented Programming
Alex Lee - Constructors
Alex Lee - How to use "this"
Alex Lee - How to use "static"