don slater [email protected] wanda dann [email protected] copyright 2012 wanda dann, don...
TRANSCRIPT
Wanda [email protected]
Copyright 2012 Wanda Dann, Don SlaterAll rights reserved
Do in order penguin swagger penguin pushes the bowling ball so it rolls to the pin pin falls over pin responds (stands up and pushes the ball back to penguin) penguin falls over
Algorithm
Initial Scene
Where are we?
Problem Statement
Understand the
problem
Implement the design
Test the code
Design a solution
Implementation is the act of translating an algorithm/storyboard into a computer program.
To Translate Decompose algorithm step by stepIncrementally develop and test
program statements
Step 3: Implement the design Decompose
Problem Statement
Understand the
problem
Implement the design
Test the code
Design a solution
Develop a storyboard / algorithm
Decompose into simple steps
Break an action into simpler steps
12/17/09
Do in order penguin swagger penguin pushes the bowling ball so it rolls to the pin pin falls over pin responds (stands up and pushes the ball back to penguin) penguin falls over
penguin move forwardpenguin roll leftpenguin roll rightpenguin stand up straight
Incremental Development Write code
Write statements (code) – a few steps at a time, not the entire program at once!
Problem Statement
Understand the problem
Implement the design
Test the code
Design a solution
Decompose into simple steps
A statement is created by dragging a code tile into the edit space
Actions useful for setup Same actions and more
Scene Editor Code Editor
Step 5: Test and Revise, if neededProblem Statement
Understand the problem
Revise?
Implement Revise?
Test the code
Design a solutionRevise?
Does it work, no matter what?
Try different values (distance, direction, revs)
When Run… button is clicked◦ Alice builds the scene for the runtime window◦ Executes the program statements, starting with
the myFirstMethod procedure (defined in MyScene)
Runtime window
However…..
Where is the swagger?
Do in order penguin swagger penguin pushes the bowling ball so it rolls to the pin pin falls over pin responds (stands up and pushes the ball back to penguin) penguin falls over
Creating our own procedures
- or -
Teaching a penguin to swagger