Write a generic class My Math Class with at type parameter T where Tis a numeric object (Integer, Double or any class that extends jayalang-number) Add a method standard Deviation (stdev) that takes...

Write a generic class My Math Class with at type parameter T where Tis a numeric object (Integer, Double or any class that extends jayalang-number) Add a method standard Deviation (stdev) that takes an Array List of type Tand returns a standard deviation as type double. JAVA Link from instruction http://en.wikipedia.org/wiki/Standard_deviation Code from instruction public class stdev { public static void main(String[] args) { double [] d = new double[10]; for(int i = 1; i d[i-1]=i; double total = 0; double average = 0; for(int i = 0; i total += d[i]; average = total/10; System.out.println("average "+average); total = 0; for(int i = 0; i total += (d[i] - average)*(d[i]-average); total /= 9; double std = Math.sqrt(total); System.out.println("Stdev = " + std); } }
Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here