My question is quite similar to this Declaring an array inside a class, and setting its size with the constructor
But i am going to work in racket. So exactly i want to implement a class which represent object polygon (any number of sides). Polygon is exactly determined by number of sides and array of vertices in clockwise order. So my class must contain those attributes. Is there some way to implement this in racket. I am not an expert in racket (i have done only functional programming in racket yet, but i want to use built in classes and vectors in my course project). Also is there any other way of representing polygons in abstract manner
class? Eg. are you in need of polymorfism? If not, wouldn't a simplestructbe enough?