May H.

asked • 07/18/17

Plz help me answer this

Prepare a program that will perform the followings:
1) It will prepare a drawing area of 600pixels by 600 pixels.
2) It will draw (not fill) a black rectangle with the following 4 corners:
(200, 200), (400, 200), (200, 400), and (400, 400).
3) It will ask the user to enter the following information on a circle:
the x-coordinate value of center of the circle,
the y-coordinate value of center of the circle, and
the radius of the circle.
4) It will draw(fill) the circle with the provided center and the radius.
But, it will use different color for the circle depending on the
following conditions:
If the center of the circle is inside the black rectangle, it will use a
yellow for the circle. If it is right on the rectangle, it will use
red. If it is outside, it will use green.

1 Expert Answer

By:

Patrick B. answered • 08/02/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.