Algorithms and OOD (CSC 207 2013F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [IRC] [Teaching & Learning]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Java 7 API] [Java Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2013S (Walker)] [CSC 207 2011S (Weinman)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Overview
Admin
Why Minimalist?
Why Maximalist?
Sam likes minimalist approaches, at least for novice implementers
Java provides Vectors, which are dynamic arrays.
Declare
Vector<TYPE> name;
Initialize
new Vector<TYPE>(SIZE)
Set
name.set(*index*, *val*)
Get
Length? (# elements vs capacity)
What are strings? (Purpose/Philosophy)
Procedures (minimalist)
In Java, strings are IMMUTABLE. (So they can share memory.)
eyes.println("Hi, " + studentOne);
eyes.println("Hi, " + studentTwo);
When you want string-like things that are mutable, use StringBuffers
String val = "Hello";
String newval = val + val;
eyes.println(val.charAt(i));
eyes.println("There are " + val.length() + " characters in val");
if (val.compareTo(other) < 0) {
eyes.println (val + " comes before " + other);
}
Not covered
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [IRC] [Teaching & Learning]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Java 7 API] [Java Code Conventions]
Related Courses: [CSC 152 2006S (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 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.