Levels of abstraction: A Real Life Example
- Users of a car do not need to understand how black boxes work
- Interaction of a black box with outside world is well-defined
- Drivers interact with car using pedals, buttons, etc.
- Mechanic can test that engine control module sends the right
firing signals to the spark plugs
- For engine control module manufacturers, transistors and
capacitors are black boxes magically produced by an electronics
component manufacturer
- Encapsulation leads to efficiency:
- Mechanic deals only with car components (e.g. electronic
control module), not with sensors and transistors
- Driver worries only about interaction with car (e.g. putting
gas in the tank), not about motor or electronic control module