hi
how can i deleting all linked list elements using ADT
please i need the ideas ??
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
hi
how can i deleting all linked list elements using ADT
please i need the ideas ??
What is ADT?
What class are you using for the linked list? Does it have methods to help you.
double linked list
the methods :
1.Method FindFirst ( )
requires: list L is not empty. input: none
results: first element set as the current element. output: none.
2.Method FindNext ( )
requires: list L is not empty. Cur is not last. input: none
results: element following the current element is made the current element.
output: none.
2.Method FindPrevious ( )
requires: list L is not empty. Cur is not Head. input: none
results: element Previous to the current element is made the current element.
output: none.
3.Method Retrieve (Type e)
requires: list L is not empty. input: none
results: current element is copied into e. output: element e.
4.Method Update (Type e).
requires: list L is not empty. input: e.
results: the element e is copied into the current node.
output: none.
5. Method Insert (Type e).
requires: list L is not full. input: e.
results: a new node containing element e is created and inserted after the current element in the list. The new element e is made the current element. If the list is empty e is also made the head element. output: none.
6.Method Remove ( )
requires: list L is not empty. input: none
results: the current element is removed from the list. If the resulting list is empty current is set to NULL. If successor of the deleted element exists it is made the new current element otherwise first element is made the new current element. output: none.
7. Method Full (boolean flag)
input: none. returns: if the number of elements in L has reached the maximum number allowed then flag is set to true otherwise false. output: flag.
8.Method Empty (boolean flag).
input: none. results: if the number of elements in L is zero, then flag is set to true otherwise false. Output: flag.
9.Method Last (boolean flag).
input: none. requires: L is not empty. Results: if the last element is the current element then flag is set to true otherwise false. Output: flag
What problems or questions do you have about your project?
Are you having problems writing java code? If so, please post it with the error messages.