AMC 140
Lab Exercise 1
- Download unzip Lab1.zip or GraphicsIOApplet.java, GraphicsCanvas.java, Shape.java, Point.java, Line.java, Circle.java, Rectangle.java, GraphicText.java, CircleTestApplet.java, CircleTestApplet.html, LineTestApplet.java, LineTestApplet.html, ShapesTestApplet.java, ShapesTestApplet.html.
- Play around with CircleTestApplet
and LineTestApplet to get used to
the coordinate system.
- Play around with ShapesTestApplet
and look at ShapesTestApplet.java
to see the different kinds of basic Shapes you can use.
- Write your own applet, called PersonApplet1, that extends GraphicsIOApplet and draws a
Person that waves his/her hand like shown below:
- start by drawing the person statically using Circles, Lines, etc. in initOutputs()
- then make them wave their hand up in onButtonPressed
- then make them alternate moving their hand up and down
- you can make your Person do other things too, if you want :)