Question: this is a question about java ASSIGNMENT 6 QUESTION 1 Write the class BoxCirclePanel which draws a random box and circle. The box is red

 this is a question about java ASSIGNMENT 6 QUESTION 1 Writethe class BoxCirclePanel which draws a random box and circle. The boxis red and placed at a random location inside the panel. The

this is a question about java

ASSIGNMENT 6 QUESTION 1 Write the class BoxCirclePanel which draws a random box and circle. The box is red and placed at a random location inside the panel. The square box also has a random size which is at most the current width of the panel. Similarly with the green circle. You can find out the current size of the panel with getWidth() and getHeight() which both return an int. Each time the code is run, the box and circle will be at a different location and have different sizes. The locations/sizes change as the window is re-sized. At times, only a partial box/circle will be shown. It is also possible for one of the box/circle to cover the other. BoxCircle.java is provided. Please submit both BoxCirclePanel.java and BoxCircle.java Sample run: Initial window: BoxCircle

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!