A Bug's Life |
Create a new project named ABugsLife and add new classes named Location and Bug that are copied and pasted from the versions of the Location and Bug classes that are found in the Unit 2 Demo Programs area of our website. However, you must edit the Bug class by adding the following methods:
Also, write a client class named ABugsLife. This class should be modelled on the BugTracingDemo1 and self-created Bug Tracing #1 client classes so that it calls and makes use of the turnRight, turnLeft, & moveTwo methods above. This class must instantiate a bug named flik (or whatever name you choose to use). You must printout the "AFTER" state of the bug as you did in self-created Bug Tracing worksheet. Your program must follow the class Coding Standards. Save all of the files associated with this assignment in the appropriate network folder. Preconditions:
You must hand in the following on separate pages stapled in this specified order:
|