| | |
doubly linked list implementation
![]() |
>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?
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.
•
•
Join Date: Oct 2004
Posts: 2
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- doubly linked list--- help needed1 (C++)
- linked list implementation of stacks (C)
- To create contact manager using doubly linked list(c++) (C++)
- "doubly linked list" question (C)
- How Can I Sort a Doubly Linked List Queue? (C)
- Code Snippet: Doubly Linked List Implementation (C)
- Need Help to Print Doubly Linked List(DLL) (Java)
Other Threads in the Java Forum
- Previous Thread: help with polymorphism and inheritance...getting null values
- Next Thread: Countdown
| Thread Tools | Search this Thread |
6 @param actuate affinetransform android api applet application arc array automation balls binary bluetooth bold business c++ class client code codesnippet collections color compare component coordinates database defaultmethod detection doctype dragging ebook eclipse educational error file fractal froglogic game givemetehcodez graphics gridlayout gui guitesting helpwithhomework html ide ideas image ingres intersect invokingapacheantprogrammatically j2me java java.xls javaexcel javaprojects jni jpanel jtextarea julia keytool keyword linux list map method methods mobile mysql netbeans nextline object parameter php pong problem producer program project projectideas recursive replaysolutions rim scanner sell server set size sms sql sun swing swt terminal threads tree web websites windows






