logo CodeStepByStep logo

MickeyBox

Write a complete program in a class named MickeyBox that uses the DrawingPanel to draw the following figure:

Java DrawingPanel close maximize minimize
expected output
 

The window is 220 pixels wide and 150 pixels tall. The background is yellow. There are two blue ovals of size 40 x 40 pixels. The left oval's top-left corner is located at position (50, 25), and the two ovals' top-left corners are 80 pixels apart horizontally. There is a red square whose top two corners exactly intersect the centers of the two ovals. Lastly, there is a black horizontal line through the center of the square.

(You don't need to include any import statements at the top of your program.) (The next exercise is a modified version of this program, so you can use the code you write here as a starting point for that exercise.)

Class: Write a complete C# class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.