Unformatted text preview: mming is a paradigm A “philosophy” to design/organize programs A “method” to write programs
x Some don’t C (but you can still follow the OOP paradigm!)
109 Reminder: Imperative programs
x An imperative program is a set of instructions, possibly
An organized into functions
x A few features, from C: Variables (local to a procedure, global to a program)
Functions may have side effects (access to memory)
The program can be organized into multiple files
… 110 Why OOP is useful?
x Way of thinking: life is about objects/people, what they
Way know, and what they can do. A car cannot do the same thing as a dog car I cannot use my procedure “fetch the ball” on my car cannot
x Contrast: reasoning about memory and actions to be
Contrast: performed on this memory
x Way of thinking: data and what we can do with it should be
Way packed together, not decoupled
packed 111 Why OOP is useful?
x OOP tends to force modularity
x OOP tends to force structure in program designs Hierarchical view of properties/behaviors
x OOP tends to force the user to reason (more)
x OOP tends to isolate the data from the user Or, it...
View Full Document
- Fall '00