Good afternoon all.
I have just joined these forums, and I thank you for your help in advance.. I was browsing through this forum and it seems to have quite the community for java users, which will be very helpful for me as I have just begun a java orientated class at University.. I am working away through my 4th lab , and have hit a road block, and unfortunately haven't been able to have any classmates help. I was hoping you could point me in the right direction how how I could solve this problem :
Add code to implement insertAtPosition with the signature
public void insertAtPosition(Object what, int insertPosition);
This method inserts the 'what' item at the indicated position. Elements following that position are moved one position in the +1 direction to make room for the new element. Items should only be inserted at already occupied positions, except that it is legal to insert an element at the position just past the filled positions (or at the zero position if there are no items). Note that for a linked list, the elements logically 'move' positions but don't physically move.
Any help would be appreciated. Thank yoU!