+ All Categories
Home > Documents > Don Slater [email protected] Wanda Dann [email protected] Copyright 2012 Wanda Dann, Don...

Don Slater [email protected] Wanda Dann [email protected] Copyright 2012 Wanda Dann, Don...

Date post: 13-Dec-2015
Category:
Upload: curtis-thompson
View: 220 times
Download: 1 times
Share this document with a friend
Popular Tags:
13
Don Slater [email protected] Wanda Dann [email protected] Copyright 2012 Wanda Dann, Don Slater All rights reserved
Transcript
Page 1: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

Don [email protected]

Wanda [email protected]

Copyright 2012 Wanda Dann, Don SlaterAll rights reserved

Page 2: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All 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

Page 3: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

Where are we?

Problem Statement

Understand the

problem

Implement the design

Test the code

Design a solution

Page 4: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 5: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 6: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 7: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 8: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

A statement is created by dragging a code tile into the edit space

Page 9: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

Actions useful for setup Same actions and more

Scene Editor Code Editor

Page 10: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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)

Page 11: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 12: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

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

Page 13: Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu Copyright 2012 Wanda Dann, Don Slater All rights reserved.

Creating our own procedures

- or -

Teaching a penguin to swagger


Recommended