Lec13 - Lecture 13: Pseudocode - The Computer The...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 13: Lecture 13: Pseudocode Pseudocode -- -- The Computer The Computer Programmer Programmer ’s Roadmap s Roadmap Todd Todd Wittman Wittman PIC 10A PIC 10A Sec 5.10 Sec 5.10 : Stepwise Refinement : Stepwise Refinement • Break down every problem into very simple tasks. • How do you get 3 scoops of Ben & Jerry’s Chocalate Chip Cookie Dough ice cream? • Open cupboard. • Take out bowl and place on counter. • Open freezer. • Remove pint of ice cream ( Chocolate Chip Cookie Dough ) and place on counter next to bowl. • Repeat the following 3 times – Scoop out ice cream ( Chocolate Chip Cookie Dough ) and place in bowl. • Note our functions RemovePint( ) and ScoopIceCream( ) are not flavor specific. • We use functions in everyday life and we pass the necessary parameters. • This allows us to adapt to new situations and new ice cream flavors. (Broccoli Fudge Swirl? Tequila Marshmallow? Cleveland Crunch? Teriyaki Pork? Peppermint Wasabi? Tuna? Groovy Gravy?)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Computerized Archery Computerized Archery • Suppose we want to make an archery program. • The user clicks inside a target and the score is updated for which ring they click inside. Game stops when they miss the target completely. • Let’s plan this out together. .. Legolas Greenleaf is a master with the bow. But unfortunately the actor who plays him, Orlando Bloom, couldn’t hit the broadside of an Ent. If director Peter Jackson’s epic movie is going to be a success, Orlando needs some archery practice. Sec 5.11
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/19/2011 for the course PIC 10A taught by Professor Wittman during the Fall '08 term at UCLA.

Page1 / 7

Lec13 - Lecture 13: Pseudocode - The Computer The...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online