#ifndef MYLIST_ #define MYLIST_ #include "node.h" #include using namespace std; template class myList { private: int size; node * head; public: myList() { head = nullptr; size=0; } ~myList(); void insert (T item); bool find (T item, long long int & compare); void remove(); T front(); int getSize() { return size;} bool isEmpty() { return size==0;} }; template void myList:: insert (T item) { //first create a new node object with the item node * tmp = new node(item); //So what is the code that goes here? size++; } template bool myList:: find (T item, long long int & compare) { //so search through the list and see if it exists //if yes, return true //if we search the entire list and don't find it return false; } template void myList:: remove() { node * tmp; if (head != nullptr) { //something in the list. move to the next node. //so what is the code that goes here? //decrement size size--; } } template myList:: ~myList() { while(!isEmpty()) remove(); } template T myList:: front () { if (head != nullptr) { return head->data; } else { return T(0); //return the zero case here. } } #endif