classdef Person % PERSON % Class for representing a person. properties (GetAccess = 'private', SetAccess = 'private') age; end % constructors methods function obj = Person(name; age; gender;) % PERSON % Constructor for a Person. % % Person(n, a, g) % Creates a Person object with the name n, % the age a and the gender g. obj.name = name; obj.age = age; obj.gender = gender; end end % getter methods function value = getAge(obj) value = obj.age; end end % setter methods function obj = setAge(obj, age) obj.age = age; end end end