Build a class (DLList) that satisfies the doubly linked list ADT and stores data of (type String) then, write a program that will initialize 2 objects of the class (DLList), read the contents of the 2 doubly linked lists from the user. Then do the  following: 

 1)Write a method (print) that takes a doubly linked list and an integer as input, then it will print the list in order if the input integer was 1, and reverse the list if the input was -1, and print both list in order and reverse order. 

 

2)Write a method (merge) that takes two doubly linked lists as input and outputs a new sorted doubly linked list. Use this method to merge both lists in one new alphabetically sorted list, and print the result as order and reverse order. 

    • 11 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    • dllist.zip