Added polygon.cpp, Corrected error in rect.cpp