Lecture 22 Scheme Data Abstraction
- Questions
- Data Abstraction
- Don’t need to know how things are implemented
- Only need to know what its behavior is
- Group - A scheme data abstraction
- (group first-val second-val)
- constructs a new group from 2 arguments
- Group basically groups values together
- Note: Lists are not mutable in scheme
- Vocab
- Data Abstraction: groups compound information into units to be accessed and manipulated
- Constructor: a procedure that creates a data abstraction
- Selector: accesses and returns some information when a data abstraction is passed into it
- Documentation: information or instructions that describe how a data abstraction work
- Implementation: how something is coded behind the scenes
- Abstraction Barrier
- Each layer only uses the layer below it
- User program
- Data Abstraction
- Primitive Representation