Creation of a class circleClass Create a class circleClass that has a property for the radius of the circle and a constr
Posted: Sun Jul 10, 2022 11:28 am
Creation of a class circleClass Create a class circleClass that has a property for the radius of the circle and a constructor function. Make sure that there is a default value for the radius, either in the properties block or in the constructor. Instantiate an object of your class and use the methods and properties functions. OUTPUT Examples: >> mycircle = circleClass mycircle = circleClass with properties: >> yourcirc = circleClass (4.4) yourcirc = circleClass with properties: rad: 4.4000 >> methods (yourcirc) Methods for class circleClass: circleClass >> properties (mycircle) Properties for class circleClass: rad rad: 1 Function > 1 classdef circleClass 8 9 10 11 12 13 14 15 16 properties rad 1; methods end %Constructor Function function if nargin ==1 obj. elseif nargin >= 2 end (varargin) varargin{ }; error('Incorrect number of input values') Resets the solution code to the starter code provided by the instructor. Changes you have made are discarded. Save C Reset MATLAB Documentation