0% found this document useful (0 votes)
43 views

Using Procedures Practices - Oracle

This document provides lesson objectives and activities for using procedures to move objects in Alice 3 animations. It introduces key vocabulary related to procedures and the code editor. Students are tasked with planning and creating animations using different procedures to move objects according to scenarios, and reviewing each other's code.

Uploaded by

rudiawan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Using Procedures Practices - Oracle

This document provides lesson objectives and activities for using procedures to move objects in Alice 3 animations. It introduces key vocabulary related to procedures and the code editor. Students are tasked with planning and creating animations using different procedures to move objects according to scenarios, and reviewing each other's code.

Uploaded by

rudiawan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Section 2 Lesson 3: Using Procedures

Objectives Toggle and describe the visual difference between the scene editor and code editor Correlate storyboard statements with program execution tasks Identify the correct procedure to move an object Use procedures to move objects Add Java programming procedures to the code editor Demonstrate how procedure values can be altered Add a control statement to the code editor Use random numbers to randomize motion

Vocabulary Directions: Identify the vocabulary word for each definition below. 1. An object's sense of direction. 2. Program code executed once to define a single movement for an object in a scene. 3. Tells Alice 3 how to implement the instructions in a program. 4. A list of instructions that are required to accomplish a task. 5. A piece of program code that defines how the object should execute a task. 6. Sequence of numbers generated by a computer with no pattern in their sequence. 7. Describes how to perform the procedure. 8. Tell the objects in the animation how to perform tasks.

Try It/Solve It 1. In your journal, create an entry titled Scene Editor vs. Code Editor. Then, write a paragraph that describes three differences between the scene editor and code editor. Then, list the features of each. 2. In your journal, create an entry titled Features of Code Editor. List the features that you have learned about thus far, and what each does. List three features you have not

used yet. 3. Plan an animation for the following scenario using a top-down development approach: A stuffed tiger lays on the ground in the park. A girl walks up to the tiger, pauses for a moment, and picks up the tiger. Then she says, This is the tiger that I lost! The storyboard should have two columns: one for the actions in the storyboard, and one for the procedures and control statements that would need to be written for each action in the animation. 4. Plan an animation for the following scenario using a top-down development approach: Two people have a conversation about the weather. The first person turns to the second person and says Nice weather today! The second person says Yes, but I think it is going to rain tomorrow. The storyboard should have two columns: one for the actions in the storyboard, and one for the procedures and control statements that would need to be written for each action in the animation. 5. Create an animation with the correct procedures, directions, and distances based on the following scenario: A camel starts at the back left corner of the scene (the viewer's left), walks towards the camera 3 meters, then walks towards a rock 2 meters, stops for 2 seconds, then turns to the left 0.5 meters and walks forward 10 meters. Ensure that the animation works as intended at run-time, and debug if necessary. 6. Create an animation with the correct procedures, directions, and distances based on the following scenario: A ship starts at the back left corner of the scene (viewer's left), moves toward the camera 5 meters, then turns 1 meter to the right while simultaneously moving forward 10 meters. Ensure that the animation works as intended at run-time, and debug if necessary. 7. Add an object to a scene. Use a procedure to position the object so that it is 8 meters right, 1 meter above, and 15 meters in front of the center of the virtual world. 8. Add a tortoise and a hare to a scene in the grass template. Using the drag and drop method and handle styles, do the following: Drag and drop the objects so that the tortoise is to the left of the hare. Move the hare so it faces the back of the scene. Resize the tortoise so it is two times larger than the hare. Make the hare appear to lie down on the grass.

9. Create an animation for the following scenario: Five playing cards simultaneously move, turn, and roll in order. Create a new procedure for this motion. Run the animation, then alter the distance and duration argument values in the procedure and run the animation again to see how the playing card's movements change. 10. Create an animation that uses the roll procedure to make three penguins appear to roll from the back to the front of the scene simultaneously. Hint: The penguins must be positioned on their side in the scene editor to achieve this motion. Once you make all three penguins roll, change the number of rolls to a random number between 1 and 5. 11. Create an animation for the following scenario: Place a teacup on top of a tea plate (MyProps class folder). Have the tea cup and tea plate turn simultaneously in opposite directions. Run the animation. In your journal, describe how the objects behave when you run the animation.

12. With a classmate, conduct a peer review of your animation's code for one of your completed animations. Discuss what procedures and arguments you used, and what worked and didn't work. In your journal, write one thing you learned from reviewing your classmate's code. 13. In your journal, create an entry entitled Move Procedures. Create a table that lists 5 different procedures and describes how each procedure makes objects move. 14. In an animation scene, use five procedures that you have not yet used before. In your journal, create an entry entitled New Procedures. List the procedures you used, and describe how each instructed the objects to move.

You might also like