Discuss / Python / 作业

作业

Topic source

Ron09900

#1 Created at ... [Delete] [Delete and Lock User]
class Screen(object):

    def __init__(self):
        self._resolution = None
        self._height = None
        self._width = None

    @property
    def width(self):
        return self._width

    @width.setter
    def width(self, value):
        self._width = value

    @property
    def height(self):
        return self._height

    @height.setter
    def height(self, value):
        self._height = value

    @property
    def resolution(self):
        return  self._width * self._height

  • 1

Reply