CS 2500 Spring 2011
Lab 6

We want  to better understand the list ADT and how to use it.

1. Write a program to merge two lists of integers that are sorted in ascending order. The result should be a third list that is the sorted combination of the origninal lists.
2. Your program should take user input from the keyboard to insert up to 10 elements into each list (you may assume the user enters the values in ascending order and that there are no duplicate elements in the lists).
3. You may use the attached ListPM.h and ListPM.cpp for your list ADT.
4. We will discuss testing in class.

Testing should include:
• List1 empty, List2 not empty
• List2 empty, List1 not empty
• Both lists empty
• List1 = {1, 3, 5, 7} and List2 = {2, 4, 6}
• List1 = {1, 3, 5} and List2 = {6, 7, 8, 9}
• List1 = {1, 2, 3, 7} and List2 = {5, 8, 9}

What to Submit

mergeLists.cpp
script_merge

Turn in your programs and script to the CS Homework Submission System at
https://hopper.csustan.edu/cshomework/
Choose instructor:  cs2500mm
Choose course: CS2500
Choose assignment: Lab6