1. Engineering
  2. Computer Science
  3. assignment questions 1 and 2...

Question: assignment questions 1 and 2...

Question details
Assignment questions 1 and 2

>>a-ASimpleObject(4) ASimpleObject with properties: Value: 4 a.Value ans4 a-ASimpleObject(4.234) a-ASimpleObject with properties: Value: 4.2340 >a. Value ans 4.2340 >>b roundOff(a) b-4.2300 >>c exponent(a, 3) с 75.9019 OBJECT TO OPERATE ON ARRAYS u 0:.01:5.0 >>a ASimpleObject(u) Check all methods OBJECT TO OPERATE ON RANDOM ARRAYS >> u-0+5 *rnd( 10.1 ) % generate 10 random values between 0 to a-ASimpleObject(u) Check all methods ASSIGNMENT umodify the ASimpleObject, test for a single value (4.8746) to roundoff up to 3 spaces. Add a method to find squareroot of the value e Add a function to divide a value by another number 2) Create an object, MyFirstObject, to operate on a set of 5 values (1-2 digit numbers), that will 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