Presentation is loading. Please wait.

Presentation is loading. Please wait.

Don Slater Wanda Dann

Similar presentations


Presentation on theme: "Don Slater Wanda Dann"— Presentation transcript:

1 Don Slater dslater@andrew.cmu.edu Wanda Dann wpdann@andrew.cmu.edu

2  Is like learning to fly an airplane… ◦ Taking off the runway ◦ Navigating ◦ Communicating with ground control ◦ Landing ….Well, maybe more like learning spaceship controls…

3  How do we learn to write a program? – Typically, a student is instructed by a teacher Lifted: A Programming Parable Teacher Student

4 Tools we use The Computer The Programming Language

5 Task: A problem to be solved The problem Executing the solution The problem

6 Often learn from our mistakes Debugging frustration

7 Getting help... Checking the Notes Office Hours

8 What is a computer program? A program is a sequence of instructions that tell the computer what to do tell another human being what you want the computer to do Programs are written for various kinds of tasks (not mutually exclusive) solve a problem simulation game animation

9 A statement is a written instruction Three basic kinds of statements – Action to be performed (executed when the program is run) – Control (determines the sequence in which actions are performed) – Comment (documents who wrote the program and what the program is intended to do)

10 12/17/09 cardExercise.a3p

11  All objects in Alice have built-in procedures ◦ move ◦ turn ◦ roll ◦ turnToFace ◦ etc…..

12 You can define your own actions for objects. For example, jumpingJack touchToes

13 Perform actions in sequence

14  Perform exercises at the same time

15  Analogy -- Sports track  Run – one runner on a track  Thread – adds another runner on a separate track

16 Comments are used to document your program – Identify the author – Describe the problem/task Methods (procedures and functions) that you write – Simple description of what the procedure/function does (10-15 words) – Special considerations for use of the method

17 Required comments for ALL lab assignments for the remainder of the semester: – Name, section – Description of problem/task (10-15 words)


Download ppt "Don Slater Wanda Dann"

Similar presentations


Ads by Google