Ask your students what they need to know about dice to have enough information about the three aspects of a class to create dice objects building off a common game tool to help students get comfortable with making objects.
Share Ask your students what they need to know about dice to have enough information about the three aspects of a class to create dice objects building off a common game tool to help students get comfortable with making objects. with FacebookShare Ask your students what they need to know about dice to have enough information about the three aspects of a class to create dice objects building off a common game tool to help students get comfortable with making objects. with Twitter
-
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.