CSci 2101: Data Structures - Resources.
[Home]
[Syllabus]
[Assignments]
[Resources]
This page has resources and examples for the course and links to other helpful
materials. The materials will be added as needed.
In-class examples
- How to compile and run Java programs: when using jEdit to write
your program:
- In the lab: open a terminal window; on a Windows machine start a
command prompt window.
- Type
cd
followed by space followed by the location of
your Java file. For instance, in the lab it may be
cd 2101/lab1
and on Windows
cd Desktop\2101\lab1
Press enter, make sure the command executed successfully.
-
Suppose your file is
FirstJava.java
. Compile it by typing
javac FirstJava.java
If this gives error messages, correct the errors, save the file, and
recompile. Use "up" arrow key so that you don't have to retype the
command. Note that if you get "file not found" error, you are in the
wrong place or are mistyping the file name. If you get an
"unrecoginzed command" or a similar error, make sure that java
compiler is installed on your system.
-
After the program compiles with no errors, type
java FirstJava
(assuming that FirstJava is the name of your program). Note that you
don't put .class or .java after the program name.
- May 24th: FirstJava.java
- May 25th: Conditions.java,
Randomness.java,
Loops.java
- May 26th: Factorial.java, TestStack.java, Postfix Calculator, FindMistakes.java
- May 27th: IntArray.java, StringArray.java, Starting code for "waves"
- May 28th: TestArrayList.java, Exercise on ArrayList
- June 1st:
-
June 2nd: Postfix calculator redone using
switch, Review for Midterm I, Solutions
-
June 4th: Java interfaces, Java exceptions.
-
June 7th: Linked List starting code.
- June 8th: Iterators examples
- June 9th: Queue interface (our queue
implementation will be added there as well).
- June 10th: Sorting methods
- June 11th: non-comparison sorting. Counting sort files (uses abstract classes), A good description of counting sort, A very nice visualization of counting sort (just disregard the title "radix sort").
- June 14th: Review for Midterm II., JUnit example
- June 16th: Radix sort animation (very slow - be patient!), Priority queue
- June 17th: Priority Heap, Binary Search Tree.
- June
18th. Tasks for today: finishing the
binary search tree, writing in-order traversal (the result returned
as a List interface). The BinarySearchTree code so far.
- June 21st: AVL tree interactive animation, Hashtables starting and testing code.
- June 22nd: Finished AVL Tree (with
tests), Hash table with separate chaining.
- June 23rd: Starting code for graphs.
- June 24th: Java graphical user interfaces (GUIs)
Standard Java classes and interfaces used in the course
Downloads
Reading materials
Resources