One of the first classes we worked with was Button. We saw that Buttons have many properties with simple data types. For example:
The values of the Size and Location properties are not simple data types like integer or string, they are objects. The value of the Location property is an object that is an instance of the class Point and the value of the Size property is an instance of the class Size.
A Point is an object with two properties, X and Y. In this example, the value of the X property is 100 and the value of the Y property is 200.
A Size is an object with two properties, Height and Width. In this example, the value of the Height property is 25 and the value of the Width property is 75.
The value of the Font property of a Button would similarly be an object, an instance of the class Font, which spelled out properties like the Name and Size of the Font.
We have been assigning strings and numbers to variables and properties all along. It turns out that we can assign objects to object variables and properties as well.
Of course, the object we assign to an object variable or an object property must be of the correct class. You could not assign a Font to the Location property or a Point to the Size property.