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.

Results 1 to 4 of 4

Thread: deleting all linked list elements using ADT

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy deleting all linked list elements using ADT

    hi

    how can i deleting all linked list elements using ADT

    please i need the ideas ??


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,921
    Thanks
    55
    Thanked 2,352 Times in 2,323 Posts

    Default Re: deleting all linked list elements using ADT

    What is ADT?
    What class are you using for the linked list? Does it have methods to help you.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: deleting all linked list elements using ADT

    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

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,921
    Thanks
    55
    Thanked 2,352 Times in 2,323 Posts

    Default Re: deleting all linked list elements using ADT

    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.

Similar Threads

  1. Linked list Schminked list help with Nodes Please
    By Bially in forum Collections and Generics
    Replies: 1
    Last Post: September 29th, 2011, 04:20 PM
  2. Linked List Help
    By BuhRock in forum Collections and Generics
    Replies: 3
    Last Post: September 26th, 2011, 09:43 AM
  3. [SOLVED] Linked List Help
    By lieles in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 4th, 2011, 10:32 PM
  4. Help with linked list
    By joecool594 in forum Collections and Generics
    Replies: 3
    Last Post: November 28th, 2010, 12:33 PM
  5. Shuffling elements in a linked list.
    By xecure in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 1st, 2010, 02:25 PM