1-Write a class named Rectangle to represent rectangles. The data field are width and height. Use double for width and height. You need to provide the accessor methods for the properties and methods findArea()


2. Write a client program to create two rectangle with the following descriptions any length and width
the first rectangle must be red and the second yellow

I got the rectangel and the are but how do i setcolor





public class Rectangle {
private double length;
private double width;

public Rectangle(double l, double w)

{
length = l;
width = w;
}




public double calculateArea()
{
return length * width;
}


public static void main(String[] args) {

double r1 = 0;
double r2 = 0;

Rectangle rectangle1 = new Rectangle(10,10);
Rectangle rectangle2 = new Rectangle(10,20);

r1 = rectangle1.calculateArea();
r2 = rectangle2.calculateArea();


System.out.println("rectangle1 area " + r1);
System.out.println("rectangle2 area " + r2);


}
}