下面是一种可行的类的设计方式:
class Shape:
def __init__(self, width):
self.width = width
def get_area(self):
pass
class Rectangle(Shape):
def __init__(self, width, height):
下面是一种可行的类的设计方式:
class Shape:
def __init__(self, width):
self.width = width
def get_area(self):
pass
class Rectangle(Shape):
def __init__(self, width, height):