ENG 06 – Lecture 15; 2/26/2013
Preliminary report due Friday
o Set milestones
o Turn in 1 for whole group, each person also needs an individual report
Need to make youtube video, tutorial and overview of design and operation of project
Notes: Object Oriented Programming
Modular Programming
o Break large problems down into smaller ones
Each smaller problem can be coded and tested individually
“Divide and conquer”
o Core of modularization is subroutine
Still need to decide
How to divide into subroutines?
What are the arguments and return values
Are there side effects?
Structured Programming
o Invented as a means of good modularization
Relies on functional decomposition
Take a large global task, break it down into smaller and smaller tasks until
you get down to trivial tasks that are easy to implement
o Not always right the first time; sometimes you have to throw away your first
attempt
Limitations of Structured Programming
o When you build a system, you are always evolving it, adding functions
Can‟t always anticipate these changes
o The more successful a system is, the more tasks it is asked to handle,
System gets tweaked to handle these tasks/modifications
Tweaks become hacks
Functionality gets further from original
Becomes more complex and unstable
More modifications require worse hacks/full rewrites
Process stops when costs outweigh benefits
Relationship between Structures and Objects
o Structure data type has natural fit for databases-numbers, strings, etc.
o Object-oriented goes a step beyond structures
A collection of different variables (like a structure) but with the functions
associated with those variables
o Basketball team example
Program to track everything you know about players
Object – baske
More
Less