Text:Carrano and Prichard, Data Abstraction and Problem Solving with Java: Walls and Mirrors, Addison Wesley, 2001.
Fractions Assignment Hash Table Example
Hash Table Assignment Clowns Assignment
Verification of Program Correctness
Simple List Example Full Linked List Example
Some Sorting Methods Expression
Parser
Tree Assignment Stack Assignment
|
|
Topic
|
|
Sep 9
|
Introduction,
html and Javascript
Chapter
1: Software design , Clowns project
|
|
Sep 18
|
Java
review: Arrays of objects, windows and frames, html forms
Clowns
Project
|
Sep 23
|
Chapter
12: Hashing, pages 578-592
|
|
|
Sep 25,
30
Oct. 2 |
Chapter
2: Recursion
Analysis
of algorithms
|
|
Oct 7
|
Chapter
3: Inheritance and polymorphism
|
|
Oct 9,
14
|
Chapter
4: Linked lists
|
|
Oct 16,
21, 23
|
Chapter
5: More recursion
Prefix,
infix, postfix, BNF, Expression parser
|
|
Oct 28
|
Exam
|
|
Oct 30, Nov. 4 |
Chapter
6: Stacks
Chapter
7: Queues
|
|
Nov 6,
11, 13
|
Chapter
10: Trees
|
|
Nov 18
|
Chapter
8: Classes and objects
|
|
Nov 20,
25
|
Chapter
9: Algorithm efficiency, sorting
|
|
Dec 2,
4
|
Chapter
11: Tables, priority queues, heapsort
|
|
Dec 9,
11
|
Threads,
Huffman codes
|
|
Dec
16
|
Final
Exam 10:55-12:35
|
Program grading:
Programs
will be due on the date listed on the assignment.
Programs
one week late will incur no penalty.
Programs
two weeks late will lose 1/3.
Programs
three weeks late will lose 2/3.
Programs
four weeks late will receive zero points.
All
programs must be handed in by Dec. 11
Programs
may be resubmitted once for several additional points.
Programs
should be created and compiled using JDK 1.2 or higher.Submit a disk with
a compiled version of the program and a printout of the Java code.Make
sure that your disks and printouts are labeled with your name and course
number.
Grading:
The
midterms and final will each be worth 1/4.All the programs together will
count for the other quarter.There will be 5 or 6 programming assignments.Program
grades will be posted on my web site when available.The table will be sorted
by the last six digits of your social security number.Names and the first
three digits will not be shown.Final letter grades will be displayed on
the web site by the end of December, if not earlier.
Applications:
One
class in an application should be a driver class.It should instantiate
the other class or classes and call appropriate methods.Usually this class
is quite small.Other classes should do all the work for the program.For
example, a program that reads data from a file, processes it, and then
prints out results should do all the file processing in one or more classes.Methods
in the classes can then be called from the main driver class.The classes
that do the work are usually grouped into packages that are imported into
the driver class.
Packages:
Classes
that share functionality should be grouped together in packages.The package
statement must be the first executable statement in the file. One of the
classes in the file must be a public class.There can be other classes
in the same file, so long as they are used only be the public class.If
a class is to be imported into another class, it should be made public
and stored in a separate file.When package files are compiled, their .class
files must appear in a subdirectory that has the name of the package.
Visibility
qualifiers:
Most
variables in a class will be private.They are then accessible only by the
class and its inner classes.If a variable or method is to be used inside
the surrounding package, it should be marked as protected.Only those methods
that are to be used in classes in other packages should be public.Usually
variables are not public, only protected or private.Private variables often
require get and set methods to retrieve them or provide them
with values.Constructors are also used to provide values for variables.These
are only used for initialization.Do not omit the visibility modifier.If
you do, the variable or method has package visibility.If this is what you
want, specify it using the protected modifier.