Project #3
Due Dates: javadoc for Set ADT
posted to
your website: 12 noon, Wednesday, Feb. 11, 2004
Test plan: beginning of
class, Wednesday, Feb. 11, 2004
Entire project: beginning of
class, Monday, Feb. 23, 2004
This two-stage project depends mostly on Chapter 2 of Lewis &
Chase, Java Software Structures.
Lewis & Chase present a bag ADT in Chapter 2, and an array
implementation of this ADT. With this as a basis, in
Project 3 you will develop a set
ADT, and develop and test an array implementation of sets.
There's a LOT of detail in this project. You must read this
assignment carefully, start early, and pay close attention to
the details! You have a total of three weeks for this project, and you
will need it!
Preliminaries--Preparing your directory structure to use the book's
Java classes:
As we know, Java is very fussy about your directory
structure: the compiler expects certain packages and classes to be in
certain (sub-)directories and gives compilation errors if it can't
find what it needs in the expected places.
Once you completed lab 1, your directory structure looked like this:
your own top-level directory
csci53
programs53
(a shortcut to Feldman's copy of files from Lewis &
Loftus)
csci133
cs1
(currently contains the Keyboard
class)
mbf (Feldman's classes,
currently contains the Screen
class)
programs133 (a shortcut to
Feldman's copy of files from Lewis & Chase)
jss2
(a subdirectory of reusable classes from Lewis & Chase)
exceptions
(an inner directory of exception class files)
You now need to create some directories of your own, whose structure
mirrors that of the programs133 distribution:
- In your csci133 directory, create a subdirectory, csci133/jss2, which will
contain any reusable classes you copy from Feldman's programs133/jss2 directory, and
yet another, csci133/jss2/exceptions,
to contain any exceptions you copy.
- Copy the application program Bingo.java, from programs133 into your own csci133 directory.
- Examine this file; to compile it, you'll have to copy what it
imports. Notice that it imports jss2.ArrayBag.
So copyArrayBag.java from programs133/jss2 to your csci133/jss2.
- Now examine ArrayBag.java;
note that it implements the interface BagADT, and imports from jss2. Copy the necessary files.
(It also imports from the standard API's; you always have access to
these without copying them.)
- Now compile each of the files you've copied, startiing from the
lowest directory and moving back to Bingo.java.
- Run Bingo.
Stage 1:
In Stage 1 you will develop the set
ADT and deliver it in the form of a javadoc page posted to your SEASCF
website.
- First decide on the methods your ADT will support. See
suggestions in the textbook and use your experience with set theory to
create a realistically complete set of set operations.
- Now develop the source file for SetADT. If you wish,
you can start with a copy of BagADT and just make the
necessary changes.
- Now develop a preliminary array implementation of the set class;
if you wish, you can start with a copy of ArrayBag and just
make the necessary changes. Along the way, you'll need a new exception EmptySetException;
you can just copy and modify EmptyBagException.
- Make sure this preliminary version is syntactically and
semantically valid by compiling it and fixing any compilation errors.
- Once you have a valid preliminary class, transfer it to your
website and produce the javadoc documentation.
- By the deadline, e-mail the URL for the javadoc page to Prof.
Feldman and to Mohamed.
As the second part of Stage 1, develop a test plan and submit it in
class by the deadline.
Stage 2:
Complete and test the set class. To simplify your test data, you can
just use Integer values. Do NOT use int; Integer
is a class, so you can use Integer objects as your set
elements. You will find it most efficient to
follow the suggestions in the Incremental Development guide.
(end of project)