Reading 6: Abstract Data Types
In this reading, we look at a powerful idea: abstract data types. This idea enables us to separate how we use a data structure in a program from the particular form of the data structure itself. Abstract data types address a particularly dangerous problem: clients making assumptions about the type’s internal representation. We’ll see why this is dangerous and how it can be avoided. We’ll also discuss the classification of operations, and some principles of good design for abstract data types. The following questions use the code below. Study it first, then answer the questions. Suppose the program has paused after running the line marked /*A*/ but before reaching /*B*/. A partial snapshot diagram of its internal state is shown at the right, with numbered gray boxes as placeholders for you to fill in. What should each of those boxes be? 1 2 3 4 (missing explanation) (missing explanation) (missing explanation) (missing explanation) (missing explanation) (missing explanation) (missing exp
Reading 6: Abstract Data Types Reading 6: Abstract Data Types Praxis Tutor exercises Keep making progress on TypeScript by completing the following categories in the Praxis Tutor: ✓ Creating Classes 2/2 ✓ Access 1/1 Software in 6.102 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives Today’s class introduces two ideas: Abstract data types Representation independence Introduction In this reading, we look at a powerful
Explore this link on the map →related reading
- Reading 10: Abstract Data Typesweb.mit.edu
- Reading 7: Abstraction Functions & Rep Invariantsweb.mit.edu
- Reading 11: Abstraction Functions & Rep Invariantsweb.mit.edu
- Reading 8: Defining ADTs with Interfaces, Generics, Enums, and Functionsweb.mit.edu
- Reading 12: Defining ADTs with Interfaces, Generics, Enums, and Functionsweb.mit.edu
- Reading 11: Recursive Data Typesweb.mit.edu
- Reading 15: Equalityweb.mit.edu
- Reading 10: Equalityweb.mit.edu
- Reading 17: Recursive Data Typesweb.mit.edu
- Reading 17: Recursive Data Typesweb.mit.edu
- The Law of Leaky Abstractions – Joel on Softwarejoelonsoftware.com
- Abstractioncs.cornell.edu