CSE 1030: The Collection Frameworks

Slides:



Advertisements
Similar presentations
Transparency No. 1 Java Collection API : Built-in Data Structures for Java.
Advertisements

Map Collections and Custom Collection Classes Chapter 14.
Chapter 6 The Collections API. Simple Container/ Iterator Simple Container Shape [] v = new Shape[10]; Simple Iterator For( int i=0 ; i< v.length ; i++)
Data Structures & Java Generics Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L16 (Chapter 22) Java Collections.
© 2006 Pearson Addison-Wesley. All rights reserved16-1 Methods in the List Interface (Part 1 of 16)
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L15 (Chapter 22) Java Collections.
Chapter 19 Java Data Structures
CSE373 Optional Section Java Collections 11/12/2013 Luyi Lu.
Collections. Why collections? Collections are used to hold a collection of objects. List holds objects based on order of insertion and can hold non unique.
Java Collections Framework A presentation by Eric Fabricant.
Java Programming: Advanced Topics 1 Collections and Wealth of Utilities.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 22 Java Collections.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 22 Java Collections.
111 © 2002, Cisco Systems, Inc. All rights reserved.
CSS446 Spring 2014 Nan Wang.  Java Collection Framework ◦ Set ◦ Map 2.
Object Oriented Programming Ders 10: Data Structures Mustafa Emre İlal
Chapter 18 Java Collections Framework
CSS446 Spring 2014 Nan Wang  Java Collection Framework ◦ LinkedList ◦ Set ◦ Map 2.
Collections Data structures in Java. OBJECTIVE “ WHEN TO USE WHICH DATA STRUCTURE ” D e b u g.
13 Collections Framework. 2 Contents What is Collection? Collections Framework Collections Hierarchy Collections Implementations Set List Map.
JAVA COLLECTIONS LIBRARY School of Engineering and Computer Science, Victoria University of Wellington COMP T2, Lecture 2 Thomas Kuehne.
Lab - 11 Keerthi Nelaturu. Ordered Structure Using Doubly linked list All elements in the list are arranged in an order Implement the Ordered Structure.
1 Java's Collection Framework Map and Sets. 2 Collection Framework  A collections framework is a unified architecture for representing and manipulating.
JAVA COLLECTIONS LIBRARY School of Engineering and Computer Science, Victoria University of Wellington COMP T2, Lecture 2 Marcus Frean.
CS-2851 Dr. Mark L. Hornick 1 Linked-List collections Structure and Implementation.
3-1 Java's Collection Framework Another use of polymorphism and interfaces Rick Mercer.
Collections ABCD ABCD Head Node Tail Node array doubly linked list Traditional Arrays and linked list: Below is memory representation of traditional.
Slides by Donald W. Smith
Chapter 4 Linked Structures.
Sixth Lecture ArrayList Abstract Class and Interface
Linked Lists Chapter 5 (continued)
Chapter 19 Java Data Structures
ECET 370 ASSIST Something Great/ecet370assist.com
JAVA COLLECTIONS LIBRARY
JAVA COLLECTIONS LIBRARY
University of Central Florida COP 3330 Object Oriented Programming
Chapter 10: Non-linear Data Structures
ECET 370 Education for Service-- tutorialrank.com
Road Map CS Concepts Data Structures Java Language Java Collections
Java Collections Overview
Road Map - Quarter CS Concepts Data Structures Java Language
Chapter 17 Linked Lists.
Chapter 19 Binary Search Trees.
Chapter 4 Inheritance.
Chapter 14 Graphs and Paths.
Chapter 12 Collections.
CSE 1030: Data Structure Mark Shtern.
CSE 1030: Arrays Mark Shtern.
Chapter 10 Datapath Subsystems.
CSE 1030: Implementing GUI Mark Shtern.
Summary Array List.
Chapter 20 Hash Tables.
Copyright © 2011 Pearson Education, Inc
Welcome to CSE 143! Go to pollev.com/cse143.
Searching for Guinea Pig B: Case Study in Online Research
CSE 1020: The Collection Framework
Chapter 5 Algorithm Analysis.
Chapter 12 Collections.
Road Map CS Concepts Data Structures Java Language Java Collections
1.4 ทบทวน JAVA OO Programming Concepts Declaring and Creating Objects
The Facts to Be Explained
Linked Lists Chapter 5 (continued)
Chapter 5 Linked Lists © 2011 Pearson Addison-Wesley. All rights reserved.
Circuit Characterization and Performance Estimation
CS 240 – Advanced Programming Concepts
Linked Lists Chapter 5 (continued)
Chapter 2 Reference Types.
Copyright © 2011 Pearson Education, Inc
Presentation transcript:

CSE 1030: The Collection Frameworks Mark Shtern

Summary Linked List Exceptions Checked/Unchecked Assertions Iterators

Final Exam Written Component Lab Component Static feature Non static feature Mixing static and non-static features Aggregation and Composition Inheritance Arrays, Linked List and Collection UML Lab Component API implementation

Nodes and Links in a Linked List Copyright © 2010 Pearson Addison-Wesley. All rights reserved.

Schema of an Insert Operation Add - “2” Pred Curr Head 1 3 Tail 2

Schema of a Remove Operation Pred Curr Head 1 2 3 Tail

Schema of a Contains Operation Curr Head 1 2 3 Tail

Implementation of Linked List

linked list Implement a linked list with the following methods Add Remove Contains Size The linked list should implement the following interfaces Iterable Serializable Cloneable

A Doubly Linked List Copyright © 2010 Pearson Addison-Wesley. All rights reserved.

Collection Map Set List

Implementing Classes List  ArrayList, LinkedList Set  HashSet, TreeSet Map  HashMap, TreeMap

Default List  ArrayList Set  HashSet Map  HashMap

Generics List bag = new ArrayList(); bag.add(“testing”); --------------------------------------------------------------- List <Date> bag = new ArrayList<Date>(); ---------------------------------------------------------------- <? extends P> or <? super C>

Searching and Sorting Collections sort (List<T> list) binarySearch(List<? Extends T> list, T x)

Example A student DB is a collection of type.lib.Student The DB supports Add/Edit/Delete student Query students by id, name, gpa and major Generate reports Class GPA report displays a course number and the average of all GPA grades awarded in the course Student statistic report shows number of students by major Develop the DB