COSC 072: Computer Science II

Project 3
Spring 2004

Due: Mar 1 @ 5 PM
8 points

This project involves implementing a List ADT as a doubly-linked list.

  1. Retrieve the zip file I've prepared for p3 with two easy commands:
    gusun% cp ~maloofm/p3.zip ./
    gusun% unzip p3.zip
    
    In this archive, there should be Makefile, Makefile.dep, main.cc, main.h, and list.h.

  2. Implement the Node<T> class for doubly-linked nodes. You can just modify the Node<T> class from P2, but if you really want to be on the edge, you can derive the DLNode<T> class from the Node<T> class. (Sorry, no extra credit.)

  3. Use the doubly-linked Node<T> class to implement the List<T> class. I've generated DOC comments for the methods of this class and the method stubs for the class are in the file list.h. Documentation: HTML     PDF

  4. Using your implementation of the Person class from P1, write the code necessary in main to demonstrate that your implementation of the List<T> class works.

Use stepwise refinement and incremental development. For example, implement and test the Node<T> class before implementing the List<T> class.

You must provide a working UNIX Makefile with your submission. A Makefile is included in the archive. Follow the directions in the comments of the Makefile. We should also discuss the Makefile in class.

All class definitions and class methods must be documented with Doc comments. Doc comments for class definitions must include @author and @version tags. Doc comments for methods must include @param, @return, and @throw tags, where appropriate.

Instructions for Electronic Submission: At the top of the file main.cc (or the file containing the main function), place the following header comment, with the appropriate modifications:

//
// COSC 072 Project 3
// Name: <your name>
// ID: <GoCard ID>
// E-mail: <e-mail address>
// Instructor: Maloof
// TA: <TA's name>
//
// In accordance with the class policies and Georgetown's Honor Code,
// I certify that, with the exceptions of the class resources and those
// items noted below, I have neither given nor received any assistance
// on this project.
//

Although you may use any C++ compiler to develop your program, it must run under UNIX and must compile using GNU g++. You must also provide a working UNIX Makefile for your project.

If you need to include a message to your TA about your submission, then place the message in a file named README. Place the README file in the project directory p3/.

Before submitting, to reduce the size of the zip file, type 'make clean'.

To move up from the p3 directory, type

gusun% cd ..
(Additional UNIX commands at the bottom of this page: HOWTO Compile under UNIX)

When you're ready to submit, change the name of the directory to your netid. For example, if your netid is maloofm, then rename the directory p3 by typing

gusun% mv p3 maloofm
Create a zip file of the directory and its contents by typing
gusun% zip -r p3.zip maloofm/*
This command creates a zip file named p3.zip by recursively (-r) copying all of the files (*) from the directory maloofm/.

To submit the zip file type

gusun% submit -a p3 -f p3.zip
p3 is the name of the assignment (-a) and p3.zip is the file (-f) to be submitted for that assignment.

If the program submits the file successfully, you will receive a receipt by e-mail at the address <netid>@georgetown.edu.

Submit your project only once.

Once you've submitted your project, it is important to keep an electronic copy on a university machine (e.g., gusun or cssun) that preserves the modification date and time. If we lose your project or the submission system breaks, then we will need to look at the modification date and time of your project to ensure that you submitted it before it was due.

You can also change the directory's name back to the original name. For example,

gusun% mv maloofm p3
Note that changing the name of the directory does not change the dates of the files in the directory. You can also remove the zip file from your directory:
gusun% rm p3.zip

The TAs who will be grading your projects this semester are listed on the main page. You must submit your project before 5 PM on the due date.

If you're running submit correctly and you see an error message labeled as SEVERE, then execute Plan B by using pine to submit your project as an attachment to an e-mail.

To accomplish this, at the gusun prompt, type 'pine'. When the menu appears, select the menu item for composing messages (C). In the To field, type the e-mail address cosc072maloof@cs. Attach your zip file. Control-T (symbolized ^T) will give you a list of files. Select the file to attach. The subject should be your netid followed by the extension .zip. For example, if your netid is maloofm, then the subject of the e-mail should be maloofm.zip. There's no need to include anything in the MESSAGE TEXT screen.

Once you've entered this information, the screen should look something like the following:

Finally, type ^X (Ctrl-X) to send the e-mail to the course account.