The class mRectangle even extends mSquare. Inheritance was used quite frequently in this program. There are examples of this in every class. Data of type int may only be used as integers. An example of polymorphism is in the class BHandler.
Polymorphism refers to the occurrence of more than one method in the same class with the same mane.
This may be done with either overloading or overriding. I first decided what I wanted to do and layout a basic panel on a white board. I then filled in areas of the panel with a canvas, control buttons to handle the background color choices and clearing the canvas, a scribble button to activate the mouse scribble feature, and finally a list with shapes to be placed in the canvas. Once I had the idea of all the objects, I began to fill in the necessary classes and sub-classes. Before I began work on this project, I had a well defined image of what I wanted to submit as a final project.