Create a program that will create a square and fill it with a certain color based on the x and y location of the mouse. Use the mouseMoved () function and create appropriate if statements using the appropriate condition and boolean logic operator to create the square and fill it with a color. The sketch should contain a setup (),draw () as well as the mouseMoved() function . The background will be set to black and will change to the appropriate color when the mouse enters the area specified by the condition. All other areas will remain black.
// Add more colors for each rectangle
size (400, 400);
rect(0, 0, 200, 200);
// 3 more rectangles required
println(mouseX, mouseY); //Displays mouse location
// 4 conditional statements to check for location of mouseX and mouseY
// These conditions when true set the 4 colors for the 4 rectangles