}
} }
Please provide implementation for the setThread method to accompany the above code.
Method description:
public void setThread(int minimumItemsInUnit) - RECURSIVE METHOD - This method initializes thread_head and thread_next to form a list with those nodes from the original list that have at least a number of items that corresponds to the parameter. This method must be recursive. The instance variable thread_head must point to the first node with at least a number of items that correspond to the parameter (if any). You can use the method toStringThreadedNodes() (provided) to verify whether the thread has been set correctly. You will lose at least half of the points for this method if you use any iteration statement (e.g., for, while, do while), if you use more than one auxiliary method to support the recursion, or if you add any instance or static variables to support the recursion. Also, you will lose half of the points if you create any StorageUnit nodes. Make sure the support method is private. You can assume the parameter will have a value greater than or equal to 0.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here