Please enable JavaScript to use CodeHS

Chapter 2

Using Objects

2.1 Objects: Instances of Classes




Classes vs Objects

Rectangle Skeleton

GrilledCheese Skeleton

Shark Skeleton

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Ice Cream Instance Variables


Term Definition
Class Classes are the template through which objects are created. It is the formal blueprint for creating objects.
Object An object is a variable of a data type that is user defined. Every object has a state and a behavior.
Instance A created object with defined attributes.
State The data that is associated with an object or class.
Behavior The actions that can be completed by an object or class.
Object Oriented Programming The use of object and class types in programming.