Quiz Answers Here

Right-click and save the links.

Safari users: stop using Safari. No but really, it will change the extension of the files when you save them, for some reason.

</tbody> </table>
OOP
User.java The User class used by some of the other examples.
Ex01OOP.java Shows basic CS401-level stuff regarding the User class.
Ex02Adapter.java Making an adapter class that wraps User.
Ex03Inheritance.java Two classes which extend User.
Subtyping and Polymorphism
Ex04VirtualMethods.java Virtual methods and how they work.
Ex05Interfaces.java A continuation of Ex04, but using an interface.
Ex06AdHoc.java Function overloading (ad-hoc polymorphism).
Generics
Ex07Generic.java A continuation of Ex06, but using a generic function instead.
Ex08Pair.java Shows the implementation and use of a small generic class.
Ex09OrderedPair.java A non-generic Pair which implements Comparable.
Ex10TypeBounds.java A function which uses a bounded type parameter.
Bag
BagInterface.java The generic Bag interface that many other examples will use.
FixedArrayBag.java A Bag implementation which uses a fixed-size array to hold the data.
ArrayBag.java A Bag implementation which uses a resizable array to hold the data.
Ex11FixedArrayBagDriver.java Driver for the FixedArrayBag class.
Ex12ArrayBagDriver.java Driver for the ArrayBag class.
Linked Lists
LinkedBag.java Partial example of a Bag implemented as a linked list.
Ex13LinkedBagDriver.java Driver for LinkedBag.
Stacks
StackInterface.java The generic Stack interface that other examples will use.
ArrayStack.java A Stack implementation which uses a resizable array to hold the data.
Ex14ArrayStackDriver.java Driver for ArrayStack.
Recursion
Ex15RecursivePower.java Computing a power (exponentiation) recursively.
Ex16LinkedSearch.java Searching through a linked list recursively.
Ex17CoinBacktracking.java A recursive, backtracking algorithm to find combinations of coins that sum to a value.
Ex18QueensBacktracking.java Another more detailed backtracking example.
Sorting
Ex19SimpleSorts.java The 3 simple sorting algorithms (selection, bubble, insertion).
Ex20DnCSorts.java The 2 divide-and-conquer sorting algorithms (merge, quick).
Ex21RadixSort.java A (pretty naive) implementation of radix sort. Works in base 10 or 2.
Ex23SortMulti.java Shows lambdas and how to sort on multiple keys in one sort.
Lists
ListInterface.java The interface for a List we made in class.
ArrayList.java The incomplete Array-based List we started in class.
Ex22ArrayList.java A test program for ArrayList.
Iterators
Ex24Iterators.java Showing how to make a Java Iterator for an ArrayBag.
Queues
LinkedQueue.java A very basic linked-list queue with node reuse.
BSTs
BST.java An implementation of a binary search tree.
Ex25BSTDriver.java Driver for that BST.