template <typename ItemType>
void UnsortedType<ItemType>::printK(int k) const
{
	if (k <= 0)
		cout << "Invalid Value" <<endl <<endl;
	else if (k > length)
	{
		cout << k 
			<< " is larger than the size of the list." 
			<<endl;

		NodeType<ItemType>* location = listData;
		while (location != NULL)
		{
			cout << location -> info << "\t";
			location = location -> next;
		}
		cout << endl << endl;
	}
	else 
	{
		NodeType<ItemType>* location = listData;
		
		for (int i = 1; i <= k; i++)
		{
			cout << location -> info << "\t";
			location = location -> next;
		}
		cout << endl << endl;
	}
}

