Below is my process of going through the assignment.
- I looked over Soren's readme for the StudentLinkedList assignment, it looks pretty good. I modified a couple typos and reworded a few sentences for clarity.
-After installing the files properly to get the assignment working, I started by creating insertAfter(), getHead() and getLast(). After writing those three, when I run the program it "should" build and display and provided that I don't do too much clicking it shouldn't error. The program seems to hang, I haven't been able to resolve this issue yet.
-I decided to work on writing removeRemaining(). It should be easy since all I have to do is chop off the list at the desired point. The problem I have run into is that the SinglyLinkedList.class explains that @param predecessor a reference to the LinkedListNode that will precede the inserted nodes.
when the parameter is actually called "node" and there should not be any inserting in this function, period. I am assuming for the time being that the node is what the user wants to become the new tail and all subsequent nodes will be seperated. The garbage collector should handle that once I set node->next to null.
-The SinglyLinkedList.class also says I am to return the first node of the chopped off nodes. That seems really weird, maybe an explanation of why that would be necessary would keep me from being so confused here. Perhaps the user will be notified of the removed nodes? I have no idea.
-The SinglyLinkedList.class seems to be the victim of copy-paste. There's a lot of referencing to "inserted nodes" in delete/remove functions.
-Implemented the remaining function: findPredecessor, the program still hangs, so I haven't been able to test any of my newer implementations.
-Found out the program was hanging because my implementation of getHead() was not correct.
-Fixed all errors and have the program working really well now, I only found one bug, and that was when I tried to insert shapes "inside" another column. Soren pointed out to me that the insertAfter function also has to account for inserting multiple nodes at once, something I didn't get from the SinglyLinkedList.class.
-Program is complete.
Closing comments:
-The assignment is an excellent way to see a linked list implemented simply and effectively, it's very reassuring to see something as elaborate as this come together after coding something so simple.
-I found it difficult at times to know what each function is doing in relation to the project, that may be intentional on the author's part, however I found that it would have been useful to know. The functions weren't always clear as to what they were supposed to return or what the parameters being pass represented.
-Very clear and detailed descriptions for the functions would greatly increase the student's ability to provide the proper routines to make this project work.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment