Fall2005.CSCI221Homework3 History

Hide minor edits - Show changes to output

Changed line 2 from:
'''Due Date''': Wednesday, Oct. 16, 2005 (''sec 2'' +1 day) \\
to:
'''Due Date''': Wednesday, Nov. 16, 2005 (''sec 2'' +1 day) \\
Changed lines 9-10 from:
This assignment focuses on linked structures.
to:
This assignment focuses on linked structures, and unit testing.
Changed lines 13-20 from:
Design and implement a @@CircularQueue@@ ADT using a circular linked implementation (as shown in Figure 5.13 of the textbook).

Test your implementation using the test plan developed in Chapter 4.

''More details to be added...''

Your code should be fully documented via javadoc. Your code should throw approppriate runtime exceptions to handle errors.
to:
Design and implement a @@CircularQueue@@ ADT using a circular linked implementation (as shown in Figure 5.13 of the textbook). Your ADT should implement @@QueueInterface@@.

(:source lang=Java header="Interface for a class that implements a queue of Objects." tabwidth=3 -trim :)

public interface QueueInterface
{
public void enqueue(Object item);
// Effect: Adds item to the rear of this queue.
// Precondition: This queue is not full.
// Postcondition: item is at the rear of this queue.

public Object dequeue();
// Effect: Removes front element from this queue and returns it.
// Precondition: This queue is not empty.
// Postconditions: Front element has been removed from this queue.
// Return value = (the removed element)

public boolean isEmpty();
// Effect: Determines whether this queue is empty.
// Postcondition: Return value = (this queue is empty)

public boolean isFull();
// Effect: Determines whether this queue is full.
// Postcondition: Return value = (queue is full)
}

(:sourcend:)

!!!Test Plan

Read the short tutorial [[http://www.bluej.org/tutorial/testing-tutorial.pdf | Unit testing in BlueJ]].

Develop a '''test plan''' to test your implementation (see the test plan developed in Chapter 4). Your test plan should include one or more tests for each Queue operation -- tests should be thorough and not redundant.

'''Details'''

# Use BlueJ to create a test class. (Within BlueJ, you may need to '''show unit testing tools'''. Go to ''Preferences-->Miscallaneous'' and check ''Show Unit Testing Tools''.)

# Right-click on @@CircularQueue.java@@. Select ''Create Test Class''. This will generate file @@CircularQueueTest.java@@.

# Right-click on @@CircularQueueTest.java@@. Select ''Create Test Method''. Give it a descriptive name, e.g., @@TestIsEmpty@@. This will create the method and start recording your actions... (for the rest, see [[http://www.bluej.org/tutorial/testing-tutorial.pdf | Unit testing in BlueJ]]).


!!! Documentation

Your code should be fully documented via javadoc. Your code should throw approppriate runtime exceptions to test preconditions and handle errors.
Changed lines 76-78 from:
# Ensure it contains the following: @@CircularQueue.java@@.
''More details to be added...''
to:
# Ensure it contains the following: @@CircularQueue.java@@, @@QueueInterface.java@@, @@CircularQueueTest.java@@, and @@README.TXT@@.
## @@README.TXT@@ should include (in addition to your name and relevant info), a textual description of your test plan.
## @@CircularQueueTest.java@@ should contian the JUnit implementation of your test plan.
Added lines 1-45:
'''Assigned Date''': Monday, Nov. 7, 2005 (''sec 2'' +1 day) \\
'''Due Date''': Wednesday, Oct. 16, 2005 (''sec 2'' +1 day) \\
'''Due Time''': Noon

Last modified on {$LastModified} (see [[http://www.cs.cofc.edu/~manaris/index.php/Fall2005/CSCI221Homework3?action=diff&source=n&minor=n | updates]])

!!!Purpose

This assignment focuses on linked structures.

!!! Assignment

Design and implement a @@CircularQueue@@ ADT using a circular linked implementation (as shown in Figure 5.13 of the textbook).

Test your implementation using the test plan developed in Chapter 4.

''More details to be added...''

Your code should be fully documented via javadoc. Your code should throw approppriate runtime exceptions to handle errors.

Include the following in each class:


Certification of Authenticity:

I certify that this submission is entirely my own work,
as per course collaboration policy.


Name: ________________________ Date: ___________


!!! Submission

# Open your BlueJ project.

# Ensure it contains the following: @@CircularQueue.java@@.
''More details to be added...''

# Open (edit) each source file and generate the class interface (javadoc). This can be done within the editor window either by pressing CTRL/J , or selecting the ''Interface'' drop-down menu item (on the right). (Note: This is necessary to generate your documentation for grading.)

# Under the Project menu, click ''Create Jar File...'' . In the dialog box that opens, select ''Include Source'', and press ''Continue''.

# Email the generated @@.jar@@ file to ''manaris@cs.cofc.edu'', by the due date and time.