Quick Index
Now let's look at object type. This page is very important 💡.

Person Type


😊
Yang
😇
Sally
😔
Kofi
🙂
Jiao
🤭
Yawo
😀
Bob
😁
Mary
😃
Khawla
🤫
Zada
Recall our set of nine persons (objects).

Can we generalize all of these into one general object type?


Person
😊
firstName
Let's define a simple object type for Person and give it one property:

firstName -- The first name of the specific person instance/object


Ball Type


Recall our collection of many balls (objects).

Can we generalize all of these into one general object type?


Let's define an object type for Ball and give it these properties:



Rectangle Type


Recall our collection of many rectangles (objects).

Can we generalize all of these into one general object type?


Let's define an object type for Rectangle and give it these properties:


Note that for real rectangle objects, "width" and "height" will vary. They are variables. We'll learn more about these later.


Rectangle Type vs Rectangle Objects


Here is another perspective.

We have one "Rectangle type" (properties width and height).

We have many rectangle objects.