class Polygon:
    __width = None
    __height = None

    def set_value(self, width, height):
        self.__width = width
        self.__height = height

    def get_width(self):
        return self.__width

    def get_height(self):
        return self.__height


class Square(Polygon):
    def area(self):
        return self.get_width() * self.get_height()


class Triangle(Polygon):
    def area(self):
        return self.get_width() * self.get_height() * 1/2


s1 = Square()
s1.set_value(8, 15)
print(f"s1.area(): {s1.area()}")

t1 = Triangle()
t1.set_value(5, 10)
print(f"t1.area(): {t1.area()}")
