Quote:
Originally Posted by FanIn80
Sorry, one last question if you guys don't mind... How does a "constructor" fit into all of this? Is it just where you define how an object is instantiated?
|
Exactly. If you are making a new HockeyPlayer, HockeyPlayer may not be valid without a name and number, so you could have a constructor requiring those fields:
new HockeyPlayer Iggy = new HockeyPlayer("Jarome", 12);
I haven't coded in 7 years, so excuse any errors, but that's the idea.