The purpose of this lab is to practice working with class level methods.
Hint: One way to create the effect of one object being thrown on top of another is to use the "move to" method along with the "position" option. Once the position option has been selected you will see some code that says: "offset by = vector3(0,0,0)." You can create a specific offset using the world level function "right, up, forward". This is located at the very bottom of the list of world level functions. It probably won't be possible to perfectly position one object on top of another. Do your best.
Test your completed method by programming your character to make a stack of litter. The first call to "cleanUp" will place object2 onto object1, the second call will place object3 onto object2, and so on.
Once you have tested your character in a simple world, save the character so that it can be used in other Alice worlds. You can do this by right clicking the character and selecting the "save object..." option.
Further test your newly created class by opening an existing world and creating an animation in which the character stacks several objects on top of each other using the "cleanUp" method. You can bring your character into the new world by using the "Import" option under the file menu. Make sure that the "cleanUp" method works well for litter and target items of various sizes.
Remember to add appropriate comments for this method. You should also make sure you have added your name, date, and a program description at the beginning of the program.
When you are finished, print your code and hand it in.
Notice that the first steps in the "cleanWithSquash" animation are exactly the same as the "clean" animation. Rather than re-writing all of that code, your "cleanWithSquash" method should include a call to your "clean" method as its first step.
You can animate the squashing effect for the bottom object by using the resize method, and selecting "dimension -> top to bottom" under the "more..." menu. You'll need to do some math to determine how far the top object should move down when the bottom object is squashed.