Before objects

Imagine you are creating a radio app


Notes

Objects 1

Objects serve two purposes:





Notes

Objects 2

From the blueprint (class), you create an instance of a radio (called myradio)



- class: blueprint
- instance: a specific object created from a blueprint
- constructor: a function (method) to set the intial values. Must have the same name as the class







Notes

Objects 3

The benefit of having a class (blue print) is that you can easily create multiple instances of the blue print



Notes

Objects 4

Recognize when you are using objects



Notes