doubly linked list implementation

Reply

Join Date: Oct 2004
Posts: 2
Reputation: raneka17 is an unknown quantity at this point 
Solved Threads: 0
raneka17 raneka17 is offline Offline
Newbie Poster

doubly linked list implementation

 
0
  #1
Oct 7th, 2004
i'm creating a guestbook in java wherein it gets inputs(name,message) from a user then it will store this as an object. it basically works like a guestbook in webpages only that it will have a delete option. how can i do this? can anyone give me an idea please.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,541
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: doubly linked list implementation

 
0
  #2
Oct 7th, 2004
>how can i do this?
By opening your Java book and figuring out how to do each of the parts of this program. Can you read a name and a message? Can you write a class to hold a message? Can you display text? Get that working with an array first, then you can switch to a more complicated data structure like a linked list.

And by the way, just about every book on programming out there has a decent description of linked lists along with an implementation. Double linked lists are just a simple jump up from single linked lists. The only relatively hard part is making sure that all pointers are updated properly.

So, what exactly are you having trouble with?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 2
Reputation: raneka17 is an unknown quantity at this point 
Solved Threads: 0
raneka17 raneka17 is offline Offline
Newbie Poster

Re: doubly linked list implementation

 
0
  #3
Oct 7th, 2004
yeah, i can read the name and message.. but my program should have a delete option and i don't know how to do it. i can do it with arrays but my project requires me to use doubly linked list not arrays. every post has a message number. and the most recent should be at the top but it doesn't. then i have this textfield that gets the message number to refer to the message to delete. i think this approach is wrong. i have two constructors in my helper class(the main class is a gui), one gets all the strings needed(name,message etc.) and the other gets this object and sets its prev and next links. using this object i can't access the strings.
this is what my code looks like: (wherein o is the object)
item1 = o.element().getame();

i really need help! thanks for replying in advance. more power.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC