As you start working with variables that can contain objects from different classes, you might need to ask questions such as the following:
Is this object a rectangle?
Does this object support a
Is this object a member of the
Graphics class or one of its descendants?
You can then use the answers to these questions to execute different sequences of code, avoid an error, or check the integrity of your ...