CSE 250 - Fall 2008 Homework 2 Grading ******************* Note: The testing plans for this homework are paper-based. For the next several homeworks, they will be electronic. The same is true with the analysis section. Part A - Lab 3 testing plan for array-based list (8 points possible) ======================================================================== Student should have added at least three additional test cases for the list. If a student added three or more test cases, award 8 points. If the student only added one or two additional test cases, award 4 points. If the student did not add any additional test cases, award 0 points. Part B - Fixing errors in array-based list (8 points possible) ======================================================================== There are 9 errors in the code given in the lab. They are as follows: (1) insert method does not resize when underlying array is full (2) clear method does not reset the cursor correctly (it should be set to -1, but instead is set to 0. The following methods do not correctly handle the empty case: remove, replace, goToBeginning, goToEnd, goToNext, goToPrevious, getCursor Students earn 8 points for correctly fixing 3 or more of these errors. Award 4 points if one or two of these errors are fixed. Award 0 points if none of the errors are fixed. Part C - Implementation of Lab 3 programming exercise 2 (12 points possible) ======================================================================== This function is called moveToNth and should move the data that is currently marked by the cursor in the list to the index given as a parameter. There are several cases that should function properly with this implementation: - Empty list should throw exception - Trying to move an element to an index out of range should throw an exception - Moving cursor element to an index ahead of where it currently is should work - Moving cursor element to an index behind where it currently is should work - Moving cursor element to its same index should work If 3, 4, or 5 of these cases function properly, award 12 points. If 2 of these cases function properly, award 6 points. If 0 or 1 of these cases function properly, award 0 points. Part D - Testing plan for Lab 3 programming exercise 2 (8 points possible) ======================================================================== Student should have added at least three additional test cases for the list. If a student added three or more test cases, award 8 points. If the student only added one or two additional test cases, award 4 points. If the student did not add any additional test cases, award 0 points. Part E - Lab 4 - creation of ordered list structure (12 points possible) ======================================================================== Ordered list should have the following functionality: (1) Create an empty ordered list (2) Insert an element into an empty ordered list (3) Insert any number of elements into a non-empty ordered list and have them be in sorted order (4) Remove elements from a sorted list and have it maintain order (5) Retrieves an item from a designated search key If four or five of these function properly, award 12 points. If two or three of these function properly, award 6 points. If zero or one of these function properly, award 0 points. Part F - Test plan for ordered list structure (10 points possible) ======================================================================== Student should have indicated at least eight test cases for the new ordered list. If a student added eight or more test cases, award 10 points. If the student only added four to seven additional test cases, award 5 points. If the student added less than four test cases, award 0 points. Part G - Implementation of Lab 4 programming exercise 1 (12 points possible) ========================================================================= This program will re-assemble packets to form a completed message. Each packet has a number to tell its order in the sequence. The code should work with the file provided as well as any other file that is correctly formatted. If the file that was grader created in the proper format works and the file provided by the lab works (message.dat), award 12 points. If only the book's message.dat file works, award 6 points. If neither of these cases work, award 0 points. Part H - Analysis questions from handout (30 points possible) ========================================================================= Lab 3 questions - big O running time of functions in the implementation: (5 points each - award 2 points if answer incorrect but reason has merit) insert = O(n) remove = O(n) goToNext = O(1) goToPrior = O(1) Lab 4 questions For both parts A & B ignore the answer to entire operation, and just focus on the answers for the individual parts. There are technically four questions, so 2.5 points each. If the explanation lends insight into an incorrect answer, award 1.5 points in partial credit. Part A - 5 points Finding insertion point = O(log n) Insertion = O(n) Part B - 5 points Finding insertion point = O(n) Insertion = O(n)