
Lesson 13-3: Sorted List
Array-Based Lists | 341
Name __________________________________________ Date _______________________
Section _________________________________________
Use the following declaration on file sortedList.h for this lesson. Read the documentation on
the member functions declarations carefully.
const int MAX_ITEMS = 20;
#include <string>
typedef string ItemType;
class SortedList
{
public:
SortedList ();
// Constructor
// Post: Empty list is created.
// Action responsibilities
void Insert(ItemType item);
// Pre: The list is not full.
// Post: item is in the list; list is stored in
// increasing order.
void PrintList();
// Post: If the list is ...