Modify the main.cpp since some common operations have been put into functionInventory.cpp.