#include #include #include "list.h" #include "item.h" using namespace std; int main() { //initialize variables char exit = 'n'; char whatDo = 'n'; string name; //create beginning listobject List grocery; grocery.createList(0); while(exit != 'y') { cout << "Would you like to (a)dd, (r)emove, or (d)isplay items or (e)xit?: "; cin >> whatDo; if(whatDo == 'a') { grocery.addItem(); } else if(whatDo == 'r') { cout << "Which item do you want to remove?: "; cin >> name; grocery.removeItem(name); } else if(whatDo == 'd') { grocery.print(); } else if(whatDo == 'e') { exit = 'y'; } else { cout << "Bad input, enter a new one." << endl; } } }