Question: Upload Chapter3G.java with a main method and a showOrbital method as shown below. // CS210 Quiz, your name:____________ import java.awt.*; public class Chapter3G { public
Upload Chapter3G.java with a main method and a showOrbital method as shown below.
// CS210 Quiz, your name:____________ import java.awt.*; public class Chapter3G { public static void main(String[] args) { showOrbital(600, 200); } // required method follows... } The method showOrbital accepts parameters for the window width and height and displays the shapes at the appropriate sizes. There are 20 pixels between each of the four shape boundaries, and the shapes are concentric (their centers are at the same point). The background is RED.
Use a loop to draw the repeated shapes.
Use an if-then to alternate Colors: First the largest in BLACK, then slightly smaller WHITE, then BLACK, then WHITE.
Assume DrawingPanel.java is in the same folder as Chapter3G.java so things work just like they did for your TODO and Practice-IT, easy....
For example, if your showOrbital method is called with values of 600 and 200, the window looks like what is shown above. While a call with (600,600) would look like nice circles: if image is not showing up, is 4 rings alternating black and white and the background in red
awing Panel File View Help x-30, y-294), r-255 g-0 b 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
