Pretty much all these Actor objects mind their own business. Bugs do trample on flowers, but perhaps they feel entitled as bugs drop the flowers on the grid in the first place. You will now see a class that seriously interacts with other objects in a variety of ways. You can only appreciate the differences between the critter class and the previous classes by observing the execution of a program that includes Critter objects. The Critter will show totally new behavior and it will become the superclass for various other critter classes, much as the Actor class is the superclass for the earlier subclasses. As you observe the behavior of the objects make sure that you do not use Run, but rather use Step to slowly observe the changes with each execution. Lab Experiment Java1317 Examining the Critter Class 01. Create a GridWorld Project with Folder Java1317 Create a Java1317 project. Make sure to attach the GridWorld library. 02. Compile and Execute the Java1317 Project Compile and execute the project. You should see a grid with 5 bugs, 5 and 2 critters. You already know the Rock and Bug objects. The new blue icons, with curly tails, are Critter objects. Click Step and observe the program execution. Multiple steps will be shown here as well, but remember that you will have a different starting screen. 03. Observe Object Behavior Click Step seven times. Observe each step carefully. Compare the current step with the previous step. Watch the pictures closely and also watch your own executions.
Pretty much all these Actor objects mind their own business. Bugs do trample on flowers, but perhaps they feel entitled as bugs drop the flowers on the grid in the first place. You will now see a class that seriously interacts with other objects in a variety of ways. You can only appreciate the differences between the critter class and the previous classes by observing the execution of a program that includes Critter objects. The Critter will show totally new behavior and it will become the superclass for various other critter classes, much as the Actor class is the superclass for the earlier subclasses. As you observe the behavior of the objects make sure that you do not use Run, but rather use Step to slowly observe the changes with each execution. Lab Experiment Java1317 Examining the Critter Class 01. Create a GridWorld Project with Folder Java1317 Create a Java1317 project. Make sure to attach the GridWorld library. 02. Compile and Execute the Java1317 Project Compile and execute the project. You should see a grid with 5 bugs, 5 and 2 critters. You already know the Rock and Bug objects. The new blue icons, with curly tails, are Critter objects. Click Step and observe the program execution. Multiple steps will be shown here as well, but remember that you will have a different starting screen. 03. Observe Object Behavior Click Step seven times. Observe each step carefully. Compare the current step with the previous step. Watch the pictures closely and also watch your own executions.
text13-booleanlogiccontrolstructurers.docx