Polya’s 4-step Process 1.Understand the problem 2.Devise a plan 3.Carry out the plan 4.Look back, review results
Program Development Cycle 1.Analyze the problem 2.Design the program 3.Code the program 4.Test the program
A tempting shortcut? GOAL THINKING CODE REVISE DEBUG TEST CODE Shortcut?
Sequence
Selection NY
Loops (Iteration) N Y
Fibonacci Example SEQUENCE … QUESTION What is the value of the first term greater than 1000?
Fibonacci Example Is SUM <= 1000 No Yes NEXT LAST LAST SUM PRINT SUM SUM LAST + NEXT LAST 1 NEXT 0
Fibonacci Example
Hardware / Software
A Simple Computer System Control Unit Arithmetic Unit Memory inputoutput Flow of instructions Flow of data Flow of control