Assignment-04a

 

 

 

Foreword

Resources

Code Listings

Foil Sets

Assignments

Solutions

External Resources

SiteMap

Search

Home

Up ] Assignment-01a ] Assignment-01b ] Assignment-01c ] Assignment-01d ] Assignment-02 ] Assignment-02a ] Assignment-03 ] Assignment-03a ] Assignment-03b ] Assignment-03c ] Assignment-03d ] Assignment-04 ] [ Assignment-04a ] Assignment-04b ] Assignment-05 ] Assignment-06 ] Assignment-07 ]

The Java applet mRectApplet uses a single thread to animate a pair of rectangles. The rectangles are instances of class mRectangle, which itself extends class mPoint. In this assignment, you will design and write your own graphics object.

  1. Write an applet mGeoApplet that uses a single thread to animate three geometric objects: a rectangle, a circle, and a geometric object of your own design. Use the applet source code mRectApplet.java as a model.
  2. The rectangle should be an instance of class mRectangle while the circle should be an instance of class mOval. You may copy and use the source code of these Java classes directly.
  3. Design and write a third class of your own choosing. (Like class mOval, your new class should be a subclass of mRectangle.) For example, you could write a class mHexagon or mParallelogram. Be creative!
  4. Submit the file mGeoApplet.java as well as the source code of your custom geometric object. Put links to your applet and all of your source code files on your homework page.