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
Exam 1
Big-picture things - sort, shuffle, reverse, etc.
public interface ListOfStrings { // Constructors
// Adders
// Deleters
// Iterate stuff - Want to go through the list
/**
* Create a new position at the beginning of the list
*/
ListPosition front();
/**
* Given a current location in the list, get the value at the
* position.
*
* @pre
* We must have an element at the current position.
* @pre
* ListPostion must be associated with this list.
*/
String get(ListPosition p);
/**
* Advance to the next position.
* @pre
* hasNext(p)
*/
void advance(ListPosition p);
/**
* Determine if a ListPostion has a next element.
*
* @pre
* ListPostion must be associated with this list.
*/
boolean hasElement(ListPosition p);
/**
* Determine if one position precedes another. MAXIMALIST
*/
boolean precedes(ListPosition p1, ListPosition p2);
// Swap
/**
* Swap two elements of the list.
*
* @pre
* p1 and p2 are associated with the list
* hasElement(p1), hasElement(p2)
* @post
* The values at the positions
*/
public void swap(ListPostition p1, ListPosition p2);
} // interface ListOfStrings
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.