Algorithms and OOD (CSC 207 2014S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Java 7 API] [Java Code Conventions] [GNU Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2013F (Rebelsky)] [CSC 207 2013S (Walker)] [CSC 207 2011S (Weinman)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Overview
Can I send in my extra credit summary a week late?
Maybe once or twice. Don't make it a habit.
Can my peers have extra credit for Chinese New Year celebration 6-8 p.m. on Friday in Harris Center?
Yes.
What will we be doing with ArrayLists?
Nothing explicit. At times, you will want expandable arrays, and you have three choices: Implement the expandable arrays yourself (this maybe an assignment), use
ArrayList, useVector.ArrayLists and Vectors are both expandable arrays. ArrayLists only seem to expand one element at a time. Vectors expand more easily. ArrayLists allow internal deletion.
See examples/arrays/VectorsVsArrayLists.java
Sam's Question: Can we design a thing like lists/arrays that (1) give fast access to individual elements; (2) won't behave too slowly if we do deleteElementAt(2), insertElementAt(2), getElementAt(1000000)
_How do we tell Java that we want an ArrayList that contains only strings?
Use angle brackets. That should make Java happy. You need to use a class (so Integer rather than int).
ArrayList<String> strings = new ArrayList<String> ();
How would you write average?
We'll come back to this tomorrow, but:
a/2 + b/2 + (isOdd(a) && isOdd(b) : 1 ? 0);
Only works in the sitation that they are both non-negative
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Java 7 API] [Java Code Conventions] [GNU Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2013F (Rebelsky)] [CSC 207 2013S (Walker)] [CSC 207 2011S (Weinman)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Copyright (c) 2013-14 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.