Specifications: ITP 100: Lab 7
Due: April12, 2017 (Wednesday for Morning class)
April 17, 2017 (Monday Evening class)
Name: ______
Signature: ______
(Indicates: I have neither given nor received aid)
Specifications: Flying asteroids, interacting objects, 3
asteroids, 400 total stars, 1 movable rocket.
- Chapter 9 dealswith collision detection and asteroids. Our authorcreates a game resembling the popular Asteroid game of the 1980's. You will continue your sophisticated interaction techniques and begin with the asteroid-1scenario from your book-scenarios2\Chapter 9 folder. Copy this folder and rename it Lab7.
- Begin the tutorials (9.1 - 9.27) page 155through 162, completing section 9.4 in your textbook. Answer all the questions posed in each exercise on a separate page(s) with the section number followed by your responses.
- Notice that your textbook author has randomly placed these asteroids in the upper 1/4 of the space world. Additionally, you must modify the scenario to include actually randomly placing the three large asteroids on the true left half of the space. Please note that this modification will include the entire left half of the space world.
- Further, you should modify the privatevoid createStars(int)method as specified in the textbook. In addition to placing the 300 stars in space as gray and varying shades. Our textbook has you making each star 2 x 2 pixels of varying grey intensity. Modify these stars’ pixel sizes to 3 x 3.
- For normal credit, an additional challenge is to randomly place 100 more stars of different colors (r, g, b) in the space world. First, create 1 additionalfinal (constant)field:private final int NUMCOLORSTARS, and set it equal to 100. You should also randomly vary the pixel size of these colored stars between 2 and 4 pixels. This will obviate the need of an additional loop for these 100 stars, following the initial loop of 300 already done. Please include your pseudocode for the privatevoid createStars(int) method in your documentation, also.
- All classes you create should be heavily commentedwith copious comments throughout all of your code to document all of these changes and explain to the reader what is happening.
- Our next lab, Lab7b, will begin where this lab ends and continue from page 162 with asteroid collisions and scoring.
- Export your scenario to a "locked" executable jar file as we did in an earlier program. Then, we'll have a very playable game that can be easily shared with friends/family!
- The finished scenario should be renamed Lab7 as previously done by renaming the folder. The finished scenario should resemble and execute as an unfinished game. Currently, the player cannot lose. However, you still should be able to move, show two different images of the space ship, and fire the bullets.
- Email & attach 3 files:Space.java, Rocket.java, CreateStars.doc (pseudo code) to: before the due date.
- Documentation Checklist: Open the Greenfoot editor. Print the following files (a) through (d):
a. Space.java
b. Rocket.java
c. Write the answers to your textbook exercise questions 9.1 through 9.27 on a separate sheet.
d. Write the pseudocode for the privatevoid createStars(int)method.
e. Write at least two paragraphs to explain specific lessons learned in this lab. (please mention “locked” .jar file)
f. Staple this signed specification sheet on top and the others in the same checklist order (a through e).