#include #include "list.h" List::List() { length = 0; } bool List::IsEmpty() const{ return(length==0); } bool List::IsFull() const{ return(length==MAX_LENGTH); } int List::Length() const{ return(length); } void List::Insert(ItemType item){ if (length < MAX_LENGTH) { data[length] = item; length++; } } void List::Delete(ItemType item){ // is item in this list? // if no , return // else is the item the last in the list? // if no, move the last item to this position // subtract one from the lenght // return int i=0; bool found=false; // while ((i item) { // i++ // } while ((i data[j]) { tmp = data[i]; data[i] = data[j]; data[j] = tmp; } } } }