Modularity and Abstraction
- Modularity
- causes more work for the programmer, why?
- so why do it?
- data hiding--only data that other functions need to know about is made available (through parameters only)
- encapsulation--modification to the hidden data can only be done through calling a function
- Data Abstraction
- more modularity
- design the data in an abstract way
- decide what operations need to be performed on the data structure (abstract data type)
- Abstract Data Types (ADT's)
- collections of data values with corresponding operations
- WHAT is specified, not HOW
- ADT's are built into C++
- user-created data types
- C++ classes
Previous page
Next page
Back to Index
Back to Outline