classdef C < A methods function f = C(val) f = f@A(val); end function h = plus(f, g) disp('called C::plus') h = f.foo + 100*g.foo; end end end