Here is what I have so far
Here is what I have so far. I know that I have some things that are incorrect.
Robert
Code:
#include "unsorted.h"
UnsortedType()::UnsortedType()
{
length = 0;
}
bool UnsortedType::IsFull() const
{
return (length == MAX_ITEMS);
}
int UnsortedType::LengthIs() const
{
return length;
}
bool UnsortedType::FindItem( int item )
bool UnsortedType::InsertItem( int item )
{
if (!IsFull())
{
info[length] = item;
length++;
}
}
bool UnsortedType::DeleteItem( int item )
{
int location = 0;
info[location] = info[length - 1];
length--;
}
void UnsortedType::ResetList()
{
currentPos = -1;
}
int UnsortedType::GetNextItem()
{
int item;
currentPos++;
item = info[currentPos];
}
void UnsortedType::ClearList()
{
length = 0;
}
void UnsortedType::PrintList()
{
int length;
ResetList();
length = LengthIs();
for (int counter = 1; counter <= length; counter++)
{
GetNextItem();
return info[MAX_ITEMS];
}
}