Don Slater Wanda Dann
Is like learning to fly an airplane… ◦ Taking off the runway ◦ Navigating ◦ Communicating with ground control ◦ Landing ….Well, maybe more like learning spaceship controls…
How do we learn to write a program? – Typically, a student is instructed by a teacher Lifted: A Programming Parable Teacher Student
Tools we use The Computer The Programming Language
Task: A problem to be solved The problem Executing the solution The problem
Often learn from our mistakes Debugging frustration
Getting help... Checking the Notes Office Hours
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
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)
12/17/09 cardExercise.a3p
All objects in Alice have built-in procedures ◦ move ◦ turn ◦ roll ◦ turnToFace ◦ etc…..
You can define your own actions for objects. For example, jumpingJack touchToes
Perform actions in sequence
Perform exercises at the same time
Analogy -- Sports track Run – one runner on a track Thread – adds another runner on a separate track
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
Required comments for ALL lab assignments for the remainder of the semester: – Name, section – Description of problem/task (10-15 words)