class Shape:
def __init__(self, vertices):
self._vertices = vertices
def get_vertices(self):
return self._vertices
def set_vertices(self, vertices):
self._vertices = vertices
def __eq__(self, other):
return set(self._vertices) == set(other.get_vertices())
class Square:
def __init__(self, origin, side_length):
self._origin = origin
self._side_length = side_length
x, y = origin
self._corners = [(x, y), (x + side_length, y), (x + side_length, y + side_length), (x, y + side_length)]
def get_corners(self):
return self._corners
def __eq__(self, other):
return self._origin == other._origin and self._side_length == other._side_length
def __repr__(self):
return ', '.join(str(corner) for corner in self._corners)