Programmed in c++