The goal for this exercise is to understand how to create your own, simple class, with an instance method (function).
What you need to do to prepare for this exercise:
Within the provided starter project, there is already a class named Basic_Class_With_Instance_Method
.
You should create a class named Toaster
below it, in the space indicated.
Within the Toaster
class, you should define a method named Print()
,
which takes no parameters, and returns no data. When called, Print()
will
(for now) print out the message Hello, World, from the Instance Method Exercise!
Within Basic_Class_With_Instance_Method.RunExercise
, you should create a new instance
of the Toaster
class, and call Print
, which will print out the message.
FYI – the following phrases are all (conceptually) identical:
An instance of the Toaster
class
An object of the Toaster
class
An object of type Toaster
A Toaster
object