Friday, September 13th

 

I want to make the rabbit move its right leg forward and then backward but nothing happens. What is wrong with this code?

Sample Code

Code Blocks
Nesting Code
Control Statements - do in order, do together, while - watchout - infinite loops
Move To Procedure - oops - the solution - you must do the math
Random Numbers - Alice provides you with a random number generator - you must specify the range of those numbers.
In the same way that Alice provides you with predefined classes and procedures Java also provides you with a LOT of predifined classes that contain methods for most common tasks.

Add the following Section 2-5 Vocabulary to your Java vocabulary list:

- A story that gives the animation a purpose.
- Procedures that are created by the programmer.
- A list of actions to perform a task or solve a problem.
- When each subclass object receives the methods and properties of its superclass.
- Identifies the design specifications for the animation scenario. Two types are visual and textual.
- The process of looking at programming code, identifying repetitive programming statements, and extracting them into their own methods in order to make the code easier to understand and reuse.

Begin Section 2-5 Declare Procedures practice. Save steps 1-4 as S2-5 White Rabbit Last Name. Replace optional activity 1 with the following:
Use Google Draw to create a flow chart with the proper symbols for the following:
Start > Alarm rings > Are you ready to get up? >
Yes > Get out of bed > Turn alarm off > End
No > hit the snooze button > delay alarm 2 minutes > Alarm rings

Draw activity 2 on paper. Save activity 3 as S2-5 Flying Last Name, activity 4 as S2-5 Bunny Soccer Last Name. Demonstrate these programs for teacher check. Be sure you have comments in your code.

Begin Section 2-5 Declare Procedures project and save the project as Fish_5 Project Last Name. Demonstrate the working project to your instructor for teacher check.

Once you have completed these sections continue working on your own animation - the one you story boarded. Remember to make procedures for tasks that will be repeated often.

 

Homework

Access the Oracle iLearning site from home.
 

What

Lesson 3: Using Procedures
• 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 in a scene
• Use procedures to move objects in a scene
• 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

 

Why

Like a director, you will program objects to move and act, and make frequent changes as you go. You will need to know how to switch back and forth between the editors used to set up your scene and program your animation.

 

How

By completing the practice exercises.