GMT20230222-190242_Recording_1920x1080.mp4

This week we will review:

The example from our Review Session:

https://editor.p5js.org/des8963/sketches/0sMx9RIcL

Objects

Objects encapsulate both data and code (i.e. variables and functions)

Syntax to create an object:

// let's define a Truck
class Truck {

// everything that it means to be a truck

}

// let's create instances of trucks
let truck1 = new Truck();
let truck2 = new Truck();