Rectangle Class
Create the Rectangle class which is derived from Shape with the following properties:
- Create two integer instance variables for a width and height
- Create a constructor which takes five arguments:
- y coordinate
- x coordinate
- width
- height
- canvas (PApplet)
- Invoke the super constructor with x and y coordinates and the canvas as parameters.
- Create accessors for width and height
-
Create a draw method which overrides Shape's draw method.
You should call the rect() method defined in PApplet.
Use Shape's canvas accessor to get a handle on Shape's PApplet.
See the Processing API for more details on using rect().