Levels of abstraction: Software Design
- Old times: computer programs manipulated primitive types such as
numbers and characters
- Manipulating too many of these primitive quantities is too much
for programmers and leads to errors
- Solution: Encapsulate routine computations to software black boxes
- Abstraction used to invent higher-level data types
- In object-oriented programming, objects are black boxes
- Encapsulation: Programmer using an object knows about its
behavior, but not about its internal structure
- In software design, you can design good and bad abstractions with
equal facility; understanding what makes good design is an important
part of the education of a software engineer
- First, define behavior of a class; then, implement it