Skip to main content
ICT
Lesson AB29 - Linked List
 
Main Previous
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

LAB ASSIGNMENT AB29.3 page 16 of 16

DoublyLinkedList

Assignment:

  1. Starting with the orderedList source code from Lab Assignment AB29.2, OrderedList, modify the class definitions to implement a doubly-linked list.

  2. The requirements for this lab:

    1. Read a data file (file10.txt) from disk and build an ordered doubly-linked list.

    2. Print the list in the forward direction. Include a line number for each pair of id/inv values.

    3. Print the list in the backward direction. Include a line number for each pair of id/inv values.

    4. Delete values specified by your instructor. Be aware that your algorithm must deal with attempts to delete values that are not in the list.

    5. Print the list again in the forward direction only.

  3. You might want to test your delete algorithm on a shorter file, such as (file3.txt).

Instructions:

  1. Turn in your source code and a run output of the following:

    printing in the forward direction
    printing in the backward direction
    printing in the forward direction after deletion of values

 

Main Previous
Contact
 © ICT 2006, All Rights Reserved.