0 Replies - 1290 Views - Last Post: 24 November 2008 - 11:28 AM Rate Topic: -----

#1 kiboko   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 23-November 08

Linked List question

Posted 24 November 2008 - 11:28 AM

What I'm supposed to do - it's going to be long and rambly.

I have 2 linked lists - one is AvailableItems and one is ReservedItems. The listed objects are sorted by getKind(), in which kind is a String.

The user is supposed to enter in an integer representing the kind - specified by the GUI I am to miraculously create.

What I want is to have the item chosen by the user to be moved from the Available List to the Reserved List.

Do I need to specify what the ints mean in my linked list class as well? I am VERY confused by this and have no clue where to even begin!

OK. So I have an Inventory Interface class - and I have nothing for this in my ActualInventory implements Inventory class because I am confused about the int kind:

 public void reserveItem(int position, int kind)
   //int position = position in the list
  // int kind = the int entered by the user

I have add and remove methods for each the AvailableList and the ReservedList (which are inner classes in my ActualInventory class)...which I hope to figure out what to do with those once I figure out what to do with the int kind.

Sorry I don't have more code posted - I'm at work and not allowed to have Eclipse or install Java or anything - so I'm going off of printouts. :v: I can post it later if that is more helpful.

Thanks so much!

This post has been edited by kiboko: 24 November 2008 - 08:57 PM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1