-
There are three aspects of a class that students must know to create a new class:
-
Instance variables
-
Methods
-
Constructors
-
Make sure you ask students for these three things explicitly when creating new classes to reinforce this material.
-
When you have an object, what’s important to know about an objects?
-
When creating the Dice class, students will need to tell you:
-
the facts this object, the instance variables.
-
what the behaviors of the object the computer needs to execute, the methods.
- how to create the object, the constructor, because computers aren’t capable of figuring this out on their own.