The Artima Developer Community
Sponsored Link

Java Answers Forum
PLEASE HELP FAST

1 reply on 1 page. Most recent reply: Mar 21, 2005 12:29 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
George

Posts: 1
Nickname: slider
Registered: Mar, 2005

PLEASE HELP FAST Posted: Mar 18, 2005 1:44 PM
Reply to this message Reply
Advertisement
I am supposed to write a program by midnight tonight and I am lost....Ironically enough, it is a program using threads and posts just like a forum. the objective is to have a linked list of linked lists, or "threads". the program reads a textfile that contains "posts". all posts are seperated by a blank line in this textfile, and contain the Threadname they belong to, the users ID name, the subject title, and the body. I am supposed to imlement methods like addPost(thread,ID,Subj,body), delPost(thread,ID,Subj), delID(ID)(any post by this ID in any thread, delThread(thread)......etc.

I can write a doubly linked list, but I don't know what to do about writed a linked list of threads that contains the threadname and list of posts in that thread. I get the overhead concept, I just can't seem to put it all together.

I would literally pay to have someone help me get this to work.....My Teaching assistants are horrible and of very little help. Someone please let me know if they can help.


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: PLEASE HELP FAST Posted: Mar 21, 2005 12:29 AM
Reply to this message Reply
Just don't make things more complicated then they are.

First of all, create a class wich contains all informations about ONE post: thread,ID,Subj,body and maybe - if it is a reply - a reference to the post answered to.

What are you using as a list? A Vector?

Write a class wich extends Vector or just contains a vector.

This class contains the methods you mentioned and some String objects with ID, Subject ...


Tip: If you want to do this right, none of the attributes (variables) should be public.
Use get... and set... methods instead.

Flat View: This topic has 1 reply on 1 page
Topic: back to same jsp page again Previous Topic   Next Topic Topic: Using Java to Refresh a Materialized view

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use