School of Engineering and Applied Science
Department of Computer Science
CSci 133 -- Algorithms and Data Structures I
http://www.seas.gwu.edu/~csci133/spring04
Prof. Michael B. Feldman
mfeldman@gwu.edu

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:
  1. 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.
  2. Copy the application program Bingo.java, from programs133 into your own csci133 directory.
  3. 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.
  4. 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.)
  5. Now compile each of the files you've copied, startiing from the lowest directory and moving back to Bingo.java.
  6. 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.
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)