Specifications: ITP 100: Lab 3

Due: September 19, 2017, Tuesday (evening)

Name: ______

Signature: ______

(Indicates: I have neither given nor received aid)

Specifications: Crab, Lobster,Four Worms,

random facing & positions for 2 worms.

  1. Download the book scenario: little-crab-2and use the spaces below on this specification sheet to record answersto each question in Exercises 3.1 through 3.30.
  1. Continue through the chapter with this scenario. After you finish, your source code should look like little-crab-4. This scenario should contain each of the correct solutions to each exercise.
  1. Download the Lab3 Pseudo Code from my website and save it as a Word file. Replace your name and date on this documentation. Print this out to help you write the source code in paragraph 4.
  1. As done in Lab2, Create the method public void populate() as specifiedfrom the Pseudo Code given to you by your instructor. It is considered good programming practice to include these steps in your comments of CrabWorld.java. Notice, the 1st four objects are located in fixed positions, but the crab and the lobster should each face random directions from 0 to 359 degrees. In each of these we make use of the int getRandomNumber(int n) method. The latter two worm objects should be randomly placed into the x, y coordinates according to the pseudo code. An applet is provided on my website to demonstrate that in each run there aremany possible beginnings to the world. The crab and lobster randomly face different directions,and randomplacements of the last two worms within their specified ranges are also done. Please name your objects the same as indicated by the pseudo code.
  1. As we have done in Lab2, call the populate() method inside the constructor for CrabWorld() just after the call to: super(560, 560, 1); Once compiled correctly, this should automatically place all 6objects into the CrabWorld as described in their corresponding positions, facing the correct direction. You may use this graphic and your instructor's web site as examples for initial placement.
  1. Save this scenario as: Lab3. This creates a folder of files. Email & attach only3 files: CrabWorld.java, Crab.java,Lobster.java to: before the due date.
  1. Open the Greenfoot editor and print hard copies of the three.java files along with this signed specifications sheet. Please use these blanks to fill in your correct answers for the tutorials in Chapter 3.
  1. Write the answers to the following exercises in our textbook:

3.1 ______

3.2 ______

3.3 ______

3.4 ______

3.5 ______

3.6 ______

3.7 ______

3.8 ______

3.9 ______

3.10 ______

3.11 ______

3.12 ______

3.13 ______

3.14 ______

3.15 ______

3.16 ______

3.17 ______

3.18 ______

3.19 ______

3.20 ______

3.21 ______

3.22______

3.23 ______

3.24 ______

3.26 ______

3.27 ______

3.28 ______

3.29 ______

3.30 ______

  1. Please use this checklist to help you to assemble your documentation for Lab3:
  1. EmailSubj:ITP100 Lab3 & attach these 3 files: CrabWorld.java, Crab.java,

and Lobster.java to me at

  1. Staple thesedocuments in this order, to turn in immediately before beginning theclass due:

1) This signed specification sheet (on top)

2) CrabWorld.java source code

3) Crab.java source code

4) Lobster.java source code

5) Pseudo code for public voidpopulate()