classdef test2
    
    properties (SetAccess = 'private')
        wert;
        zahl;
    end
    %variablen deklaration
    properties
       a;
       b;
    end
    %variablen deklaration
    
    methods
        function obj = test2(x)
            obj.wert = x;
            %obj.zahl = zahl;
        end
        %konstuktor
        
        function x = errechne(obj)
            x=obj.zahl+obj.wert;
        end
        %weitere function die eine rechenoberation ausführt
        
        function obj = setzeWert(obj, wert)
            obj.wert = wert;
        end
        
        function obj = setzeZahl(obj, zahl)
            obj.zahl = zahl;
        end
        
        function x = nimmWert(obj)
            x = obj.wert;
        end
        
        function x = nimmZahl(obj)
            x = obj.zahl;
        end
        %set und get methoden
    end
    %methoden deklaration
    
end