lintcode 454.矩阵面积

class Rectangle:

    '''
     * Define a constructor which expects two parameters width and height here.
    '''
    # write your code here
    
    '''
     * Define a public method `getArea` which can calculate the area of the
     * rectangle and return.
    '''
    # write your code here
    def __init__(self, a, b):
        self.a = a
        self.b = b
        
    def getArea(self):
        self.c = self.a * self.b
        return self.c

你可能感兴趣的:(lintcode 454.矩阵面积)