Question: Write three methods: square(num), cube(num), and sin(num) where num is an array. The methods return the square, cube and sin values of each element in
Write three methods: square(num), cube(num), and sin(num) where num is an array. The methods return the square, cube and sin values of each element in the array. Put methods sleep 100 millisecond (Thread.sleep(100);) after each computation. To test the methods, create the following array: Report the taken time at the end of the computation. num = [2,4,6,8,10,12,14,16,18,20]. b) Rewrite the exerise using threads for each method.
(in java)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
