Submit all programming assignments on blackboard, CSC 17
Sample C++ program and corresponding Java program
More basic examples of classes and objects in Java with
Notes on Pointers, Stack and Heap. (MUST READ)
Sorting algorithms compared (includes mergesort and quicksort). Updated (Read notes about Lambda Expressions)
Fibonacci functions, from best to worst
Triangle fractal (with and without recursion)
Condensed Notes on Interfaces, Inheritance and
Generics. (REQUIRED READING)
How to implement a Queue: Linked List,
Circular Queue, and
comparing their performance
How to implement a Priority Queue as
a Binary Heap (also requires HeapValue interface and graphical display program)
Notes and examples of polymorphism and
notes on Lambda Expressions. (BOTH REQUIRED READING)
Infinite sets using predicates and lambda expressions. This version is slightly different from one in video lecture.
team sports simulation with subclass. This is a sample solution to part of lab 1b, further illustrates inheritance, dynamic dispatch.
Abstract Class and Example
oopfood.java (examples of oop).
invest.java: example of the Observer Design Pattern
Program with notes explaining where dynamic dispatch occurs
Non-polymorphic closed hash map,
Polymorphic hashmap as an abstract class (CHMap) and
sample non-abstract subclass (Idmap). Stand-alone
polymorphic hashmap (HMap) with linear-probing rehash.
Finite state machine abstract class, with
sample state machine subclass (and diagram).
Additional sample machine for matching parentheses (and diagram).
Dynamic programming notes and simple example (routes)
Dynamic programming and the Knapsack Problem,
with sample input files shopping list
and packing for flight
Subtle points about type casting
traditional and modern implementations of (unbalanced) binary search trees, with Tree interface and graphical display for the modern version
Notes on Exceptions and Serializable data structures.
Notes on Dijkstra's algorithm and Algorithm A* (background for lab 10), with additional
8-puzzle program (application of algorithm Astar) and its graphical animation