Question: Assignment This project is based on a programming assignment found in Reges and Stepps's Building Java Programs: A Back to Basics Approach, Second Edition. You

 Assignment This project is based on a programming assignment found in

Reges and Stepps's Building Java Programs: A Back to Basics Approach, Second

Edition. You should use StdDraw, not Swing, to complete this project. Write

a program that models a list of possibly overlapping rectangular two- dimensional

Assignment This project is based on a programming assignment found in Reges and Stepps's Building Java Programs: A Back to Basics Approach, Second Edition. You should use StdDraw, not Swing, to complete this project. Write a program that models a list of possibly overlapping rectangular two- dimensional windows, like the windows for the programs open on your computer. Use an ArrayList to store the windows. The order of the windows in the list implies the order in which they would display on the screen (sometimes called the "z- order"), from 0 on the bottom to size0 -1 on the top. Your project should have three classes: Window, WindowDisplay, and WindowDriver. You will also need to include the StdDraw class in your project. The Window class will represent a single window. It should contain the following: Instance variables: Two private variables of type double for the x and y coordinates of the center of the window. Two private variable of type double for the width and height of the window. A private variable of type Color for the color of the window. (You will need to import java.awt.Color.) Methods: A constructor that takes the x and y-coordinates, width, height, and color of the window. This constructor should use its parameter to set the instance variables. A method that displays (draws) a single window. A method that has two parameters, an x-coordinate and a y-coordinate. This method should return true if the x-coordinate and y-coordinate are located within the window and false if they are not. Assignment This project is based on a programming assignment found in Reges and Stepps's Building Java Programs: A Back to Basics Approach, Second Edition. You should use StdDraw, not Swing, to complete this project. Write a program that models a list of possibly overlapping rectangular two- dimensional windows, like the windows for the programs open on your computer. Use an ArrayList to store the windows. The order of the windows in the list implies the order in which they would display on the screen (sometimes called the "z- order"), from 0 on the bottom to size0 -1 on the top. Your project should have three classes: Window, WindowDisplay, and WindowDriver. You will also need to include the StdDraw class in your project. The Window class will represent a single window. It should contain the following: Instance variables: Two private variables of type double for the x and y coordinates of the center of the window. Two private variable of type double for the width and height of the window. A private variable of type Color for the color of the window. (You will need to import java.awt.Color.) Methods: A constructor that takes the x and y-coordinates, width, height, and color of the window. This constructor should use its parameter to set the instance variables. A method that displays (draws) a single window. A method that has two parameters, an x-coordinate and a y-coordinate. This method should return true if the x-coordinate and y-coordinate are located within the window and false if they are not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!