lecture2 - Administrative Issues Due Today Programming...

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

View Full Document Right Arrow Icon
1 Programming Lecture 2 Administrative Issues • Due Today – Signed Honor Pledge – Explore Blackboard • Any problems with access to course pages? • Ongoing – Program 0 • Read submission instructions! • Any problems? • New Assignments – Homework 0 • Office Hours: Today 1-3 Last Class… • Recipe Metaphor – Tools = Computer – Ingredients = Data (Stored Digitally) – Directions = Program • Fetch-Decode-Execute Cycle – Computer fetches instruction – Decodes instruction – Gathers data and performs operation Programming • Goal of this course: – Learn how to program – Metaphor: How to write the recipe • Programming is problem solving • Computers don’t solve problems. They are tools to help solve a problem • People solve problems Problem Solving • Understanding the Problem • Breaking the problem into manageable pieces • Designing a solution • Considering alternatives to the solution and refining the solution • Implementing the solution • Testing the solution and fixing any problems that exist Understanding the Problem • Understanding the problem is essential to solving it • Example: – “My bike has a flat tire.” – Is this good enough? Did someone let the air out? or Is a nail stuck in the tire?
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 Breaking the Problem Into Manageable Pieces • Problem: Flat tire from a nail, with a hole too big to patch • Pieces: – Handling the breaks, gears – Removing/Replacing the wheel from the bike – Taking apart the tire and replacing the popped tube – Inflating the repaired tire Designing A Solution • Release brakes • Removing the wheel from the bike • Removing the tire from the rim • Replacing the tube • Replacing the tire onto the rim • Putting the wheel back on the bike • Reconnect the break • Inflate the repaired tire Considering Alternatives and Refining • Can I just pump up the tire? – No, the air will just leak out again. • Can I patch the tube instead of replacing it? – No, the hole is too big. • Can I use a tube from my older bike? – Yes! I’ll save a couple bucks! Implementing the Solution • This is the actual program, or algorithm . • For bike example, the detailed instructions for each piece: – Locate the metal fastener at the bottom of the steering wheel brake wire. – Take needle-nose pliers and turn fastener to the left. – Let out tension in the brake wire – Unhook wire from brake pads – Using your hands, open the brake pads wide enough that the tire can move freely between the pads –… Testing the Solution • The only way to see if something works is to try it! • For bike example:
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 04/15/2009 for the course ASTRONOMY 1000 taught by Professor Kim during the Spring '01 term at Yonsei University.

Page1 / 7

lecture2 - Administrative Issues Due Today Programming...

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