About 'Instantiating Your Class'!

  • Relax, they’re just user defined types!
  • string FirstName; creates a string object
  • FBullCowGame BCGame; works the same way
  • These instances are initialised by “constructors”
  • Instantiating means “creating an instance of”
  • So we’re simply creating a game instance.

(Unique Video Reference: 17_BC_URC)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

1 Like

Hello @sampattuzzi,

I feel well guided through the course until now. Maybe you can outline the difference between “Instantiation” and “Initialization”.

Cheers
Kevin

1 Like

I found an answer online about Instantiating and Initialization and used the BCGame for the example.

Instantiating

This is when memory is allocated for an object. This is what the BCGame is doing. A reference to the object that was created is returned from the BCGame.

Initialization

This is when values are put into the memory that was allocated. This is what the Constructor of a class does when using the BCGame.

Privacy & Terms