classdef Square < handle
properties (Access=private)
s = 1 % side length
end
methods (Access=public)
function obj = Square(side)
if nargin == 1
obj.s = side;
end
end
function a = area(self)
a = self.s*self.s;
end
end
end