Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please use java language to write this program? PLEASE DONOT USE DATA STRUCTURES OR ARRAYS TO WRITE THE PROGRAM. ReflectingPond You will be

Can you please use java language to write this program?

PLEASE DONOT USE DATA STRUCTURES OR ARRAYS TO WRITE THE PROGRAM.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

ReflectingPond You will be creating three files: ReflectingPond.java (the main GUI controller), PondQuadrants.java and Ripples ,java. As in previous assignments, the GUI controller class must extend WindowController since it wil be handling all the mouse movementslevents and user interaction. However, unlike previous assignments, this class does not directly manipulate any objectdraw GUI components. We recommend implementing the program in stages, in the order we have listed below Stage 1: Creating the Lines Begin with the GUI controller class (ReflectingPond). Set up a 600 x 600 pixel canvas. Then create a new class (PondQuadrants) which is responsible for all of the creation and manipulation of the pond (and its 4 quadrants). In PondQuadrants, cre ate two Line objects to divide the canvas into four quadrants of equal size (a horizontal line and a vertical line). The end points of the lines should be based on the that you will need to keep track of the proportions that the axis lines divide the canvas into. For example, at this point the width and height proportions will both be 0.5. Have ReflectingPond create a new PondQuadrants object in its begin) method. You should now be able to see basic axes on your canvas. Note that your PondQuadrants class needs a way to reference the GUI controller's canvas object and your GUI controller needs a way to reference the PondQuadrants object. (width and height). Note Stage 2: Creating the Colored Quadrants Modify PondQuadrants to color the background of each quadrant To do so we need to create a FilledRect for each quadrant, and then set the color for it. We also need to change the color of the axis lines to white so we can still see them. We recommend creating a helper method to set the size/positions of the Lines and 4 FilledRect quadrants based on the current width and height proportions and current canvas size. This will help make the next stage easier. Your program should now look like the screenshot to the right private static final Color UPPER LEFT QUAD COLOR new Color (7,156,222) private statie final Color UPPER RIGHT QUAD COLOR - new Color (0.210,234) private static final Color LOWER LEFT QUAD COLORnew Color (27,67.93) private statie final ColoE LOWER RIGHT QUAD COLOR- new Color (9,0,137) private static final Color LINE COLOR -Color WHITE ReflectingPond You will be creating three files: ReflectingPond.java (the main GUI controller), PondQuadrants.java and Ripples ,java. As in previous assignments, the GUI controller class must extend WindowController since it wil be handling all the mouse movementslevents and user interaction. However, unlike previous assignments, this class does not directly manipulate any objectdraw GUI components. We recommend implementing the program in stages, in the order we have listed below Stage 1: Creating the Lines Begin with the GUI controller class (ReflectingPond). Set up a 600 x 600 pixel canvas. Then create a new class (PondQuadrants) which is responsible for all of the creation and manipulation of the pond (and its 4 quadrants). In PondQuadrants, cre ate two Line objects to divide the canvas into four quadrants of equal size (a horizontal line and a vertical line). The end points of the lines should be based on the that you will need to keep track of the proportions that the axis lines divide the canvas into. For example, at this point the width and height proportions will both be 0.5. Have ReflectingPond create a new PondQuadrants object in its begin) method. You should now be able to see basic axes on your canvas. Note that your PondQuadrants class needs a way to reference the GUI controller's canvas object and your GUI controller needs a way to reference the PondQuadrants object. (width and height). Note Stage 2: Creating the Colored Quadrants Modify PondQuadrants to color the background of each quadrant To do so we need to create a FilledRect for each quadrant, and then set the color for it. We also need to change the color of the axis lines to white so we can still see them. We recommend creating a helper method to set the size/positions of the Lines and 4 FilledRect quadrants based on the current width and height proportions and current canvas size. This will help make the next stage easier. Your program should now look like the screenshot to the right private static final Color UPPER LEFT QUAD COLOR new Color (7,156,222) private statie final Color UPPER RIGHT QUAD COLOR - new Color (0.210,234) private static final Color LOWER LEFT QUAD COLORnew Color (27,67.93) private statie final ColoE LOWER RIGHT QUAD COLOR- new Color (9,0,137) private static final Color LINE COLOR -Color WHITE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions