Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

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

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions