Question: Write a class that models a list of possibly overlapping rectangular twodimensional window regions, like the windows for the programs open on your computer. The
Write a class that models a list of possibly overlapping rectangular twodimensional window regions, like the windows for the programs open on your computer. The order of the rectangles in the list implies the order in which they would display on the screen (sometimes called the “-order”), from 0 on the bottom to size() –1 on the top. Each rectangle stores its (x, y) position, width, and height. Your rectangle list class should have a method that takes a Point as a parameter, treats it as though the user clicked that Point on the screen, and moves the topmost rectangle touching that Point to the front of the list.

Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
public class Tile private int x private int y private int width private int height private Color color public Tileint x int y int width int height Color color thisx x thisy y thiswidth width thisheigh... View full answer
Get step-by-step solutions from verified subject matter experts
