Hi, I would appreciate it a great deal, if someone would please, constructively, critique my code ?
Required methods :
public static double min(double a)
public static double max(double a)
public static double mean(double a)
public static double median(double a)
Which compute the minimum, the maximum, the mean value (the average value), and the median reps.
NB. For the median of an array with an even number of numbers in total return the average of the two medianvalues.
Consider renaming method "count" which is responsible for counting how many elements an array of array has. The main reason for that is..., look at the method "mean" you got here. It looks so confusing that you have a method call "count" as well as variable name "count". Both of them are from completely different contexts.
Method "count" I'd personally name something along the line: numberOfElementsIn(double)
Formatting is not just a matter of style and aesthetics. It shows attention to detail. It shows that you care that your code is readable to others. It also helps prevent bugs and makes it easier to find bugs.
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck