I have been given the task to improve a piece of code. The code is meant to draw different polygons. The initial code has a constructor which adds the names of polygons such as "triangle", "square" and "rectangle" to an ArrayList. Another ArrayList contains the centerpoints for each polygon. I have been hinted that creating a class for each polygon would improve the code as it hinders errors as early as in the compiling state, such as if the user would mistype a polygon name. I am pretty new to coding so I don't really know how that could be implemented practically. Could anyone give an example on how such a class would look like?