#include <iostream>
#include "LinkedList.h"
usingnamespace std;
int main()
{
LinkedList* theList=NULL;
int op=0;
cout<<"Welcome user, how can we help you?"<<endl;
cout<<"(1) Create a blank list.\n(2)Add to existing list\n(3)Remove from existing list.\n(4)Clear existing list\n(5)Change name associated with list\n(6) Print list\n (7) Exit Program\n\n";
while(badOp(op)){
cout<<"Please enter a number from 1-7\n";
cin>>op;
if(badOp(op))
cout<<"\nInvalid Entry, please reenter your selection.\n";
}
switch(op){
case 1:
createList(theList);
}
}
bool badOp(int op){
return (op>7 || op<1);
}
void createList(LinkedList* l){
delete l;
l=new LinkedList;
cout<<"\nWhat will you name the new list?\n";
std::string n;
cin>>n;
l->setName(n);
}