why data abstraction?
simplify client code
- sleep would be cluttered with code for manipulating time values
make it easier to check the code
- only need to look in one place to check that time values are manipulated correctly:the procedures of the data abstraction
can tune performance
- change representation of abstract data type to improve performance
- no change to existing client code!
can extend functionality
- consider adding seconds to time values, for example
- change representation of abstract type and add new procedures:mk-time-with-secs, secs
- no change to existing client code!