some here are primitive data types n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Some here are primitive data types PowerPoint Presentation
Download Presentation
Some here are primitive data types

Loading in 2 Seconds...

  share
play fullscreen
1 / 8
amos-martin

Some here are primitive data types - PowerPoint PPT Presentation

155 Views
Download Presentation
Some here are primitive data types
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Some here are primitive data types • Characterize data into different kinds for convenience • bit • byte • integer • ascii • character • array • string • real • record objects + operations IT 179

  2. Abstraction primitive date types are already abstracted from bits 0/1 • A tool (concept) to manage complexity • Hide irrelevant details; focus on the features needed • Examples • Integer addition • File deletion using icons • The brakes on a car • Television remotes IT 179

  3. 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 IT 179

  4. Abstract Data Type (ADT) Abstract model of Priority Queues (Specification View) insert one item Priority Queue Get the one with the highest priority the minimum one (or maximum) a black box IT 179

  5. Abstract Data Type (ADT) Abstract model of Priority Queues (Implementation View) insert one item Binary Search Tree or Binary Heap? Get the one with the highest priority the minimum one (or maximum) IT 179

  6. What do we want/need to do on arrays? int[] A; double[] B; IT 179

  7. 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 Typical Collection Operations Most collections support the same operations, but may give them different names. IT 179

  8. Collection Queue List {interface} {interface} {interface} RandomAccess AbstractList {interface} {abstract} The Java Collections Framework (JCF) UML Class Diagram ArrayList Vector AbstractSequentialList {abstract} Java Provides a List interface for several implementations Stack LinkedList IT 179