Question
Programming Assignment #3: SimpleFigure and Circles Program Description: This assignment will give you practice with value parameters, using Java objects, and graphics. This assignment has
Programming Assignment #3: SimpleFigure and Circles Program Description: This assignment will give you practice with value parameters, using Java objects, and graphics. This assignment has 2 parts; therefore you should turn in two Java files. You will be using a special class called DrawingPanel written by the instructor, and classes called Graphics and Color that are part of the Java class libraries. Part 1 of 2 (4 points) Simple Figure, or your own drawing For the first part of this assignment, turn in a file named SimpleFigure.java that draws a figure on the screen using the DrawingPanel provided in class. You may draw any figure you like that meets the following criteria: The DrawingPanel's size must be at least 100 x 100 pixels. You must draw at least one line, one rectangle, and one oval that are visible on the screen. You must use at least three different visible colors in your figure. The loose guidelines for Part 1 mean that if you like, you can be creative and draw any figure you like! After the assignment is turned in, the instructor may anonymously show off some of the neat figures drawn by students for everyone to see. If you do not want to create your own figure, the following is a default figure you may draw for Part 1. If your code draws this figure correctly, you will receive full credit for Part 1. This figure contains the following properties and shapes: A DrawingPanel of size 250 x 200 with a yellow background. A green rectangle with top-left corner at (10, 20) and size 200 x 160 pixels. Red ovals with top-left corners at (10, 20) and (110, 100) of size 100 x 80 pixels. Black lines from (10, 60) to (110, 60), from (60, 20) to (60, 100), from (110, 140) to (210, 140), and from (160, 100) to (160, 180). Since a major new concept for this assignment is parameter-passing, you may optionally wish to try using parameterized methods to draw your figure. For example, the default picture above has a repeated figure of an oval with black lines through it. This figure could be turned into a parameterized static method with parameters for the figure's position. However, parameterized methods are not required for Part 1, and you will not be penalized if you do not use them. Your entire score for Part 1 will be based on its external correctness as defined above.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started