AP Java Assignment 10
An Array of Asteroids

Press '4' to rotate left, '5' to accelerate, '6' to rotate right, '2' for hyperspace
You may need to "click" on the applet to give it the "focus"

Background: Continuing to create an Asteroids game

Now that we have a functioning space ship, we'll add some Asteroids to our game. We'll write an Asteroid class that extends Floater.

Steps to completing this assignment

  1. Start by saving your previous java code as ApJava10.java
  2. Then create an empty project in Realj, and type in ApJava10 as the name of the main class.
  3. Add your ApJava10.java to the project by choosing Project | Add Java source file
  4. Add a webpage with the html necessary to display you applet
  5. Go to the Window menu in Realj, choose the project window, and choose the files you just added to the project.
  6. You should now have a working duplicate of assignment 9 that we can add the Asteroids to.
  7. Write an Asteroid class that extends Floater. You will need to
  8. Now add just a single asteroid to your applet. Start by just drawing the asteroid. Make sure you can see it and are happy with its shape before going to the next step.
  9. Now add the code that moves and rotates the Asteroid
  10. Modify your applet code so that you have an array of Asteroids

You will need a web page to display your applet. Your homepage should have a link to the web page for this assignment.

Submit the URL of your applet with the attached Java code (the .java file(s)) in an email message to mrsimon@lycos.com.