{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Target - GOval oval = new GOval(x-0.65*radius y-0.65*radius...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: Target.java * Name: * Section Leader: * ----------------- * This file is the starter file for the Target problem. */ import acm.graphics.*; import acm.program.*; import java.awt.*; i public class Target extends GraphicsProgram { p public void run() { p int x=getWidth()/2; int y=100; int radius=72; GOval outeroval = new GOval(x-radius, y-radius, 2*radius, 2*radius); outeroval.setFillColor(Color.RED); outeroval.setFilled(true); outeroval.setColor(Color.WHITE);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: GOval oval = new GOval(x-0.65*radius, y-0.65*radius, 2*0.65*radius, 2*0.65*radius); oval.setFillColor(Color.WHITE); oval.setFilled(true); oval.setColor(Color.WHITE); GOval inneroval = new GOval(x-0.3*radius, y-0.3*radius, 2*0.3*radius, 2*0.3*radius); inneroval.setFillColor(Color.RED); inneroval.setFilled(true); inneroval.setColor(Color.WHITE); add(outeroval); add(oval); add(inneroval); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online