05-20-2004, 05:31 AM
I have a file that has a database of customers in it. each customer has 5 attributes and i need to read them into an object and put them into a linked list. i cant seem to find a good example of a linked list code anywhere. could someone please give me some code that will get me moving. e: firstname.lastname@example.org cheers guys hoping someone can save me....
05-20-2004, 08:55 AM
your question is too easy...all what you need is to create a new class and put in it 4 variables that you wanna add to the linked list...
then, make a constructor to initialize them to the proper values..
and from the test class:
YourObjectName ob = new YourObjectName(var1, var2, var3, var4) as you arranged them in your class constructor...
them simply use your linked list reference to add your object..
and so on...
sorry I can't post any code here
hope I could up help you enough,
05-20-2004, 03:22 PM
This smells just like a homework assignment. In school students typically learn about linked lists as part of a data structures course. I know I did in college. If that is the case you need to do the coding yourself. We will not write it for you nor show you where to find it. That would be helping you cheat.
You can however ask specific questions and we will try to answer them and guide you in the right direction.