Well, think about it: what do you need to define a rectangle? There are actually several ways, but you need at least coordinates (for a corner or for the center) and either dimensions, or other coordinates (eg. for the opposite corner).
You probably need a color too, and perhaps more info if you want borders.
These information defines the fields you must add to the class.
You better have a constructor to set these fields at once.
Then you need a method to display it. It can change rectMode, depending on the way you defined the rectangle. It can set fill and perhaps stroke. And it calls rect().
Also see if the following articles can help you: