CSC103 - Programming Fundamentals: Program Development Lecture 3-4
CSC103 - Programming Fundamentals: Program Development Lecture 3-4
Program Development
Lecture 3-4
Instructor
Rizwan Rashid
Lecture Outline
• Program Development Cycle
• Algorithm
• The First Four Steps
2
Programming: Plan First, Then Code
End
First Four Steps
8.06
8.06
10.82
8.06
7.07
7.07
7.07
5.66
Smallest Distance: 5.66
Example-2
9.06
5.66
Smallest Distance: 5.66
Example-2
9.22
5.66
Smallest Distance: 5.66
Example-2
5.66
Smallest Distance: 5.66
Example-2
Example-2
5.66
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Example-2
Call it bestDistance
Example-2
Replace it with S0
Replace it with S1
Replace it with S2
Example-2
Example-2
Pattern of Squares
We have an algorithm that is parameterized over one integer N and
produces a pattern of red and blue squares on a grid that starts all
white. The output of the algorithm for N = 0 to N = 5 is as follows:
Summary
44
Next Lecture
• Programming Fundamentals
45
Exercise