CompSci 94 - Classwork 21- November 26, 2013 10 pts

Today's classwork first gives you practice with topics again, this time with Alice 3.

Implement the following in Alice 3

1. Add in six chickens and a person with all in a line except one chicken in front of everyone and all the chickens showing their profile.

2. Have the chicken out front turn to face the person and say something to them. Have the person bow and straighten back up. Then have the chicken move over to the person in increments of 0.25 repeatedly until they are close to the person. Then have them circle the person. Then have the person move back 1 meter and to their right so you can see them clearly.
3. Create an array of the chickens.
4. For each chicken less than 3 meters from your person, paint them yellow.
5. For each chicken randomly generate a 0, 1 or 2 and have your person say the number generated. If the number is 1, then double the size of that chicken. If the number is 2, then triple the size of that chicken. If the number is 0, leave their size the same.
6. For each chicken one at a time, have them turn to face the camera and move forward 1 meter.
7. For every chicken together, have them turn around once.
8. Write a function called NumberOfChickensOfSize with two parameters, an array of chickens and a number called height. This function should return the number of chickens that are of size height or larger.
9. Back in world.myFirstMethod, compute the number of large, medium and small chickens and have your person say how many of each there are. You should call your function you wrote to compute this.
10. Write a function called NumberChickensOfColor with two parameters, an array of chickens and a paint color. Return the number of chickens of that color. (This is optional, and a bit tricky because Alice 3 is not setup so well to do this easily).
11. Have the person say how many yellow chickens there are by calling your function. (This is optional but easy if you were able to do the previous step.)
12. Fill out this form to give your impressions of Alice 3.