subject

Objectives: Instantiating objects, sending messages, and managing multiple files
Continued practice with loops and decomposition
For this assignment you'll be using the DrawingPanel. java class provided with the textbook. You will need to have this file in the same BlueJ folder as your solution.

There are two parts to this assignment:

Part 1: For the first part, you are going to write the code to draw any figure you'd like on the DrawingPanel. For full credit, your image must meet the following requirements:

at least 200 x 200 units
contains at least three different draw and/or fill messages to the Graphics object (using at least two different shapes)
uses at least two distinct colors
and is not similar to the image for Part 2.
You must also display your name on the DrawingPanel, using the method that writes a String to the Graphics object.

Put the complete solution for part 1 in its own method definition and call this method from main(). You may decompose this solution into multiple methods, but it is not a requirement.

Part 2: In the second part of the assignment your program must produce the image below containing several images of illusions.
note: the image is attached below.

This image has a structure. You see two individual circular illusions, we'll refer to them as discs, of different sizes and colors in different locations. There are also rectangular grids that contain rows of discs. Your solution should include methods to mimic this structure.

The 5 drawings on your DrawingPanel should have the following properties:
note: picture for properties description is attached below.

For the grids, the center point specified is the center of the upper-left disc.

The overall panel has dimensions 850 x 850 with a gray background.

Implementation Requirements:
The disc shape has the following properties:
Each disc is made up of 8 rings, including the circumference, with the radii getting smaller by an equal amount with each step.
The straight lines are drawn from top center, to left center, to bottom center, to right center.
Your method design should use parameters wisely so it can be used to draw one disc of any size, any color, in any location. If you'd like, consider using the Point class from the Java API (though this isn't a requirement).
The grid is made up of a series of pairs of rows, where every other row is indented by a fixed amount (you should be able to determine this amount from the image). The number of pairs equals the number of discs per row.

Each grid is a square; the number of discs in a row indicates the number of row pairs.
Your method design should use parameters wisely so it can be used to draw one grid of any size, any color, in any location. Do not make your method more flexible than this. In otherwords, the parameters should be the minimum needed to draw the specific design.

NOTE: feel free to choose your own background color and color for the images.

Since we will need access to the Graphics object's methods and the Color constants, you need to include an import statement for its package. Include the following import statement at the beginning of your class file:

import java. awt.*;

Put the complete solution for part 2 in its own method definition. This part2() method should contain the method calls to draw the entire image. Call this method from main(). The main method should only contain 2 methods calls.

When you are finished with both parts and you call main, 2 DrawingPanels should be displayed (don't worry if they open on top of one another).

Other Requirements:
Make good decomposition choices.
You are expected to use good style (indentation, commenting, good variable names, etc) and to include a block comment for the class and for each method. Please see the documentation guidelines posted on our website.
You do not need to create class constants for the values used to call your methods. However, there is a value here that should be a defined as a constant.
Use algorithm comments effectively.
For this assignment you are limited to the language features in Chapters 1 through 3G of the textbook. In particular, you may not use if statements.
Make sure to document each of your methods (except main()) with the information discussed previously:
description of the method's job or outcome
description of every parameter
return (if there is any)


Objectives:

Instantiating objects, sending messages, and managing multiple files
Continued practi
Objectives:

Instantiating objects, sending messages, and managing multiple files
Continued practi

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
You know the right answer?
Objectives: Instantiating objects, sending messages, and managing multiple files
Continued pr...
Questions
question
Chemistry, 10.12.2019 09:31
question
Mathematics, 10.12.2019 09:31
question
Health, 10.12.2019 09:31
question
Mathematics, 10.12.2019 09:31
question
Computers and Technology, 10.12.2019 09:31
Questions on the website: 13722363