50 likes | 254 Views
Abstract Data Types. Modularity manage complexity enable maintenance Two Components Set of data structures Set of operations on those data structures Answers Two Questions What do I know What can I do. Key Ideas. What do I know? Length & Width What can I do? Accessors Set width
E N D
Modularity • manage complexity • enable maintenance • Two Components • Set of data structures • Set of operations on those data structures • Answers Two Questions • What do I know • What can I do Key Ideas
What do I know? • Length & Width • What can I do? • Accessors • Set width • Set length • Mutators • Get width • Get length • Get area An Example: Rectangle (ex 33)
What do I know • My size • My type • My contents • What can I do • Create myself • Constructor • Destroy myself • Destructor • Display myself • Insert an item into a position • Remove an item from a position • Get an item from a position • Find the largest item More Complex Example: Array (ex 34)