local ShapeImp = {}
function ShapeImp:calcArea()
return self.w * self.h
end
Shape = {}
function Shape:create()
local shape = {x=10, y=20, w = 3, h = 4}
setmetatable(shape, self)
self.__index = self
return shape
end
function Shape:draw()
local area = ShapeImp.calcArea(self)
print("area="..area2)
end
s1 = Shape:create()
s1:draw()