1. Engineering
  2. Computer Science
  3. 1 amp 2...

Question: 1 amp 2...

Question details

1 & 2

> a Value 4.2340 beroundoff(a) b: 4.2300 classdef ASimpledbject properties >>cexponent(a, 3) Value methods OBJECT TO OPERATE ON ARRAYS function obj ASİmpleobject(val) i nargin>e u001:5.0 if İsmaneric (val) aASimpleObjectu) obj.Value val, Check all methods OBIECT TO OPERATE ON RANDOM ARRAYS >> us0+5. rand( 10,1) % generate 10 random values between 0 to 5 else rror(Value must be nuneric aASimpleObjectfu Check all methods end function rs roundoff (obj) reround( [obj.value].2) ASSIGNMENT end function multiplyty(obj,n) 1 modify the ASimpleObject, test for a single value (4.8746) a. to roundoff up to 3 spaces end function r exponent (obj,n) b. c. Add a method to find squareroot of the value Add a function to divide a value by another number I r [obj.value)-n 2) Create an objedt, Myfisrobject to o 5 values (3-2 digit numbers, that wil end a) calculate the sum of all values b) calculate the mean value and c) reorder the set of values in the descending order, top being the highest value.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution