Starting from:

$29.99

Assignment 3 Linked Lists



Concepts tested by this program:

            Exceptions

New concepts tested by this program

            Generic Classes

            Doubly Linked List

            Ordered Doubly Linked List

            Iterators

            Comparators

 

Your assignment is to write a generic doubly-linked list class and a generic sorted doubly-linked list class that inherits from your generic doubly-linked class.  There is no additional GUI required for this assignment.  Your list classes will be tested with Junit tests.

 

BasicDoubleLinkedList class

            This generic doubly-linked list relies on a head (reference to first element of the list) and tail (reference to the last element of the list). Both are set to null when the list is empty. Both point to the same element when there is only one element in the list. A node structure has only three fields: data and the prev and next references. The class must only define the following entities: an inner class Node, an inner class that implements ListIterator (for the iterator method), head and tail references and an integer representing the list size. However only the next(), hasNext(), previous() and hasPrevious() methods of the ListIterator that you are required to implement.  The rest of the methods can return can throw the UnsupportedOperationException, such as:

public void remove() throws UnsupportedOperationException{

throw new UnsupportedOperationException();}

All the entities are defined as protected so they can be accessed by the subclass.  Follow the Javadoc that is provided.

 

SortedDoubleLinkedList class

            A generic sorted doubly-linked list constructed using a provided Comparator.  It extends BasicDoubleLinkedList class.  Follow the Javadoc that is provided.

 

Exception Handling

UnsupportedOperationException – this exception is a Java library exception and will be returned by the addtoFront and addToEnd implementations of the SortedLinkedList class and by the remove method of the iterator.

NoSuchElementException – this exception is a Java library exception and will be returned by the next function within the iterator class when there are no more elements in the linked list.

 


 

 

Deliverables:

Java files - The src folder with your linked lists classes, exceptions and Junit Test (.java) files

Javadoc files - The doc folder with your javadoc for student generated files

UML Class Diagram (an image, not the proprietary format, must be a .jpg)

Assignment 3 Checklist

 

Deliverable format: The above deliverables will be packaged as follows. Two compressed files in the following formats:

LastNameFirstName_AssignmentX_Complete.zip [a compressed file containing the following]

                        UML.jpg

Assignment 3 Checklist (filled in with YES or NO or ?)

                        doc [a directory]please include the entire doc folder with the javadoc for student

generated files

                                    file1.html (example)

                                    file2.html (example)

                        src [a directory]contains your linked lists classes, exceptions and Junit Test (.java) files

                                    File1.java (example)

                                    File2.java (example)

                                    File_Test.java (example)

LastNameFirstName_AssignmentX_Moss.zip [a compressed file containing only the following]

contains.java file which includes thelinked lists classes, exceptions and Junit Test (.java) files – NO FOLDERS!!

                        File1.java (example)

                        File2.java (example)

 

 

 


 

Assignment 3 Grade Sheet – Spring 2016

 

Name          ______________________Blackboard Date/Time:______________________

 

DOCUMENTATION                                                             25 points
CheckList for Assignment 3 is included and completed                                  1 pt   _____
Class documentation - Javadoc for all user createdclasses                               5 pt   _____
            Class Description, @author

            Method description, @param, @return

     Test Cases                                                                                                   10 pt_____

            JUnit Test Class

                        Implement STUDENT test for BasicDoubleLinkedListTest

                                    andSortedDoubleLinkedTest

UML Diagram                                                                                                  4 pt_____

Lessons Learned                                                                                              5  pt _____

In 3+ paragraphs, highlight your lessons learned and learning experience from working on this project.  How did you do?  What have you learned?  What did you struggle with? How will you approach your next project differently?

 

PROGRAMMING                                                                 75 points
Internal class documentation (within source code)                            5pt     _____

            Class description using Javadoc                                                                    

            Author’s Name, Class, Class Time, @author                                                

Methods commented using Javadoc, @param, @return                                                       

Compiles and Runs without runtime errors or warnings                                10 pts  _____

Accuracy                                                                                                        

            Public tests – JUnit test given to you                                                 6 pts    _____

            Your JUnit Tests – STUDENT test for BasicDoubleLinkedListTest

                                    andSortedDoubleLinkedTest                                     4 pts   _____

            Private tests – other tests run by the instructor                                   10 pts _____

Program Detail

BasicDoubleLinkedListStudent                                                         20 points

            Implements all methods of BasicDoubleLinkedList

                        addToEnd, addToFront                                              3pt   _____

                        getFirst, getLast                                                          2pt   _____

                        getSize                                                                                    1 pt   _____

                        iterator -inner class implements ListIterator                5 pt   _____

                        remove                                                                                    3 pt   _____                            

                        retrieveFirstElement, retrieveLastElement                 3 pt   _____

                        toArray                                                                        3 pt    _____

SortedDoubleLinkedList                                                                    12points

            Implements all methods of the SortedDoubleLinkedList

                        add                                                                              8pt   _____

                        addToEnd, addToFront throw exceptions                 2 pt   _____                

                        iterator – uses superclass iterator method                   2 pt   _____

 

Exception handling                                                                             8pt    _____

            java.lang.UnsupportedOperationException

            java.lang.NoSuchElementException

 

Total                                                                                                                100pt   _____

Comments:

More products