CSC 143/Chapter 10: Difference between revisions
From charlesreid1
(Created page with "=Chapter 10: ArrayLists= Sections: 10.1 ArrayLists 10.2 Comparable interface 10.3 Case study: Vocabulary comparison =Flags= {{CSC143Flag}}") |
|||
| Line 8: | Line 8: | ||
10.3 Case study: Vocabulary comparison | 10.3 Case study: Vocabulary comparison | ||
==Section 10.1: ArrayLists== | |||
===Definitions=== | |||
Definitions: | |||
* Generic class | |||
* Wrapper class | |||
* Boxing | |||
* Unboxing | |||
===Materials=== | |||
Introducing the ArrayList object | |||
Basic ArrayList operations | |||
ArrayList searching methods | |||
Complete ArrayList program | |||
Adding and removing elements from ArrayList | |||
Using For-Each loop with ArrayList | |||
Wrapper classes | |||
==Section 10.2: Comparable interface== | |||
===Definitions=== | |||
Definitions: | |||
* Comparison function | |||
* Natural ordering | |||
===Materials=== | |||
Controversy over boxing and unboxing: <code>ArrayList<Integer></code> vs <code>ArrayList<int></code> | |||
Sorting ArrayList | |||
Natural ordering and compareTo | |||
Comparing strings | |||
Implementing the comparable interface | |||
Utilizing comparable with sort | |||
==Section 10.3: Vocabulary comparison== | |||
===Material=== | |||
Some efficiency considerations | |||
Version 1: compute vocabulary | |||
* Add unique words to ArrayList, and sort | |||
Version 2: compute overlap | |||
* Number of matches between two sentences | |||
=Flags= | =Flags= | ||
{{CSC143Flag}} | {{CSC143Flag}} | ||
Revision as of 21:34, 3 September 2016
Chapter 10: ArrayLists
Sections:
10.1 ArrayLists
10.2 Comparable interface
10.3 Case study: Vocabulary comparison
Section 10.1: ArrayLists
Definitions
Definitions:
- Generic class
- Wrapper class
- Boxing
- Unboxing
Materials
Introducing the ArrayList object
Basic ArrayList operations
ArrayList searching methods
Complete ArrayList program
Adding and removing elements from ArrayList
Using For-Each loop with ArrayList
Wrapper classes
Section 10.2: Comparable interface
Definitions
Definitions:
- Comparison function
- Natural ordering
Materials
Controversy over boxing and unboxing: ArrayList<Integer> vs ArrayList<int>
Sorting ArrayList
Natural ordering and compareTo
Comparing strings
Implementing the comparable interface
Utilizing comparable with sort
Section 10.3: Vocabulary comparison
Material
Some efficiency considerations
Version 1: compute vocabulary
- Add unique words to ArrayList, and sort
Version 2: compute overlap
- Number of matches between two sentences
Flags
| CSC 143 - Intro to Programming II Computer Science 143 - Intro to Programming II, South Seattle College.
Chapter 8: Object Oriented Reivew CSC 143/Chapter 8 Chapter 9: Inheritance and Interfaces CSC 143/Chapter 9 Chapter 10: ArrayList CSC 143/Chapter 10 Chapter 11: Java Collections Framework CSC 143/Chapter 11 Chapter 12: Recursion CSC 143/Chapter 12 Chapter 13: Searching and Sorting CSC 143/Chapter 13 Chapter 14: Stacks and Queues CSC 143/Chapter 14 Chapter 16: Linked Lists CSC 143/Chapter 16
Category:Teaching · Category:CSC 143 · Category:CSC Related: CSC 142 Flags · Template:CSC143Flag · e |