![]() |
Assignment 7Task
Expand the Details:WheelsYet another version of wheels: intwheels.jar. This is coordwheels.jar with the addition of the two interfaces needed for this assignment. Circle.java
Starting with the
(These two files are already in the above .jar file. The source code provided here is just for your reference.)
Each of the two interfaces specify a single method that you will need to implement in package wheels.users; import wheels.Scalable; import java.awt.Color; import java.awt.Dimension; /** * [your javadoc description of the class here, * with @author and @version tags] */ public class Circle extends Ellipse implements SquareShape, Scalable {
Once you have implemented the two interfaces, test them by replacing the /** * Tests a Circle by drawing a bull's-eye of 3 concentric circles. */ public static void main(String[] args) { Frame window = new Frame(); //red outer circle Scalable outer = new Circle(); outer.scale(3); //yellow middle circle SquareShape middle = new Circle(); middle.setSize(100); //XXX: unsafe casts if middle isn't really a RectangularShape ((wheels.Colorable) middle).setColor(Color.yellow); ((wheels.Locatable) middle).setLocation(350, 250); //green inner circle Circle inner = new Circle(375, 275, 50, Color.green); } What to SubmitAttach your Circle.java file to an email. FAQ
GradingOut of 10 points:
|
~ztomasze Index :
TA Details: ICS111:
Assignment 7 http://www2.hawaii.edu/~ztomasze |
Last Edited: 10 Oct 2007 ©2007 by Z. Tomaszewski. |