Download presentation
Presentation is loading. Please wait.
Published byEthel Lawson Modified over 8 years ago
1
9/27/2016IT 1791 Abstraction A tool (concept) to manage complexity Hide irrelevant details; focus on the features needed Primitive date types are already abstracted from bits 0/1 Examples Integer addition File deletion using icons The brakes on a car Television remotes
2
9/27/2016IT 1792 Some here are primitive data types Characterize data into different kinds for convenience 1.bit 2.byte 3.integer 4.ascii 5.character 6.array 7.string 8.real 9.record + operations objects
3
9/27/2016IT 1793 Data Type (how to view it) Specification View of a data type –Data values –Operations defined on those values Abstract Data Type (ADT) – use of abstraction! Implementation View of a data type –Language-specific representation for the values –Implementation of the operations Implementation of an ADT
4
9/27/2016IT 1794 Abstract model of Priority Queues ( Specification View) Priority Queue a black box insert one item Get the one with the highest priority the minimum one (or maximum) Abstract Data Type (ADT)
5
5 Abstract model of Priority Queues ( Implementation View) Binary Search Tree or Binary Heap? insert one item Get the one with the highest priority the minimum one (or maximum) Abstract Data Type (ADT) 9/27/2016IT 179
6
9/27/2016IT 1796 Collection List LinkedList {interface} AbstractList {abstract} ArrayList Java Provides a List interface for several implementations {interface} The Java Collections Framework (JCF) RandomAccess {interface} AbstractSequentialList {abstract} Stack Vector UML Class Diagram Queue {interface}
7
9/27/2016IT 1797 Typical Collection Operations Add an element Remove an element Replace an element Retrieve an element Determine if a collection contains an element Get the collection’s size Determine if a collection is empty Traverse a collection Determine if two collections are equal Clone a collection Serialize a collection Most collections support the same operations, but may give them different names.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.