Differences

This shows you the differences between the selected revision and the current version of the page.

courses:cs102-200903:assigns:assign5 2009/11/06 09:31 courses:cs102-200903:assigns:assign5 2009/11/06 09:38 current
Line 39: Line 39:
    11.    return;     11.    return;
    12.  }     12.  }
 +
Line 50: Line 51:
  - From line 9 in the example code above, you can see that the move method in UFOWorld is now a void method.  The examples at the bottom of page 413 show two options for writing the move method...the one on the lower left uses a void version of move in the UFO class and the one on the lower right uses an applicative version of move in the UFO class to return a new UFO object.  Page 414 shows an almost-complete imperative version of the UFO class. In your version of the move method in UFO, you also need to make sure the UFO does not move off the screen as it moves randomly left and right.\\ \\ Modify any parts of your code that have errors after the UFO class is changed to be imperative so that they can work correctly with the imperative version of the UFO class. \\ \\   - From line 9 in the example code above, you can see that the move method in UFOWorld is now a void method.  The examples at the bottom of page 413 show two options for writing the move method...the one on the lower left uses a void version of move in the UFO class and the one on the lower right uses an applicative version of move in the UFO class to return a new UFO object.  Page 414 shows an almost-complete imperative version of the UFO class. In your version of the move method in UFO, you also need to make sure the UFO does not move off the screen as it moves randomly left and right.\\ \\ Modify any parts of your code that have errors after the UFO class is changed to be imperative so that they can work correctly with the imperative version of the UFO class. \\ \\
-  - Make the move method in the IShots union imperative. This task is discussed on pages 416 through 418 of our text. The directions given there should help you complete this part. \\ \\ Next, change the move method in the AUP class, in the Shot class, and in the IShots union so that they each return void. \\ \\+  - Make the move method in the IShots union imperative. This task is discussed on pages 416 through 418 of our text. The directions given there should help you complete this part. \\ \\  
 +  - Next, change the move method in the AUP class, in the Shot class, and in the IShots union so that they each return void. \\ \\
courses/cs102-200903/assigns/assign5.txt · Last modified: 2009/11/06 09:38 by walter
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0