Square class with test