
Inheritance Prog Assignment - Final 1
-Sample of inheritance program - Make a new program called AccountProg and attached the files below.
AnimationTimers.zip - Use for Final 2 - download an unzip - set to correct classes directory for output path.
AppletProgGraphics.zip - Use for Final 2 - download and unzip - set to correct classes directory for output path
SWING - Final 3
To download the files - right click on the link and save link as...
Annotated AP Computer Science Java Subset- this is the top-level package ap
containing AP interfaces and classes (those not part of the Java distribution).
APComputerScience.com - Dave Wittry Site
JavaTM 2 Platform, Standard Edition, v 1.4.2
API Specification
Sorting and Searching Assignment
API-Application Programming Interface - "the Java 2 dictionary"
apstring.cpp
apstring.h
apvector.cpp
apvector.h
apmatrix.cpp
apmatrix.h
apstack.cpp
apstack.h
apqueue.cpp
apqueue.h
RELATED SORTING AND SEARCHING SITES
Quick Sort Demo - Excellent...shows the comparison to the pivot value
Heap Sort Demo - Good Heap description
Priority Queues Described
Sorting Algos 1 - Does step through. Shows the upper/lower/right pivot/left pivot. NICE!
Sorting Algos 2 - Great description of selection and quicksort. Also Information on Hashing and Parsing.
Sorting Algos 3 - Excellent visual for all sorts and also for the linear and binary searches.
Sorting Algos 4 - Gives number of comparisons and number of swaps
Sorting Algos 5 - NICE - Step through one by one. Also nice breakdown of algos.
Sorting Algos 6
Selection sort - An algorithm which orders items by repeatedly looking through remaining items to find the least one and moving it to a final location.
Insertion sort Sort by repeatedly taking the next item and inserting it into the final data structure in its proper order with respect to items already inserted. Run time is O(n2) because of moves.
Quicksort - An in-place sort algorithm that uses the divide and conquer paradigm. It picks an element from the array (the pivot), partitions the remaining elements into those greater than and less than this pivot, and recursively sorts the partitions. There are many variants of the basic scheme above: to select the pivot, to partition the array, to stop the recursion on small partitions, etc.
Merge sort - A sort algorithm which splits the items to be sorted into two groups, recursively sorts each group, and merges them into a final, sorted sequence. Run time is (n log n).
Divide and conquer - An algorithmic technique. To solve a problem on an instance of size n, a solution is found either directly because solving that instance is easy (typically, because the instance is small) or the instance is divided into two or more smaller instances. Each of these smaller instances is recursively solved, and the solutions are combined to produce a solution for the original instance. Note: The name divide and conquer is because the problem is conquered by dividing it into several smaller problems.