Hi Everyone,
I am trying to write a Double Linked List code that just implements the different methods like addToFront, AddToRear, moveUp, and so on (it's suppose to be very simple). My list can be unordered or ordered since I will be doing an ascending and descending sort in my code. I am having trouble implementing the moveUp and moveDown method in
java code. I only to move the element one space up towards the head or one space during the tail. I know that, for instance, if I want to moveUp, I need a temp to hold the the element being replaced by the element being moved. I was thinking I could store the element being replaced while incrementing or decrementing the element being moved and simply moving the element back.
I haven't coded in java in over a year so a lot of learned material has been forgotten and I am really struggling with the summer course I am taking now. I would appreciate any help or direction by anyone.
This is my doubleNode:
This is my Customlist:
And my main: