Update controller.cpp

implemented exercises up to (i)