object-oriented programming Flashcards
1
Q
how are imperative programming and OO programming different?
A
imperative programming considers data and operations separately; OO programming considers them together
2
Q
imperative programming
A
considers data and operations separately
3
Q
object oriented programming
A
considers data and operations together
4
Q
program structuring (constructs) idea: abstraction through separation
A
1) procedures/functions
2) modules
3) classes
5
Q
behavior of a construct
A
what user/client sees or observes; front end
6
Q
implementation of a construct
A
how it actually does the job; back end
7
Q
behavior vs. implementation
A
implementation can change but behavior stays the same
example:
behavior: sorting an array
implementation: quicksort, bubblesort, heapsort, …
8
Q
idea of program structuring
A
- abstraction through separation
- helps information hiding
- design decisions likely to change are hidden so changes do not affect clients