As there has to be someone with some Java knowledge around on the world I'm going to try my luck here. I just got a pretty hard assignment (or so I think) for the very little info we got and I was hoping you guys could help me out. As far as I know I'm not allowed to use any libraries, just the standard Java.
I will +rep for good hints, +more for a part of the program and drown you in it if you make the entire program!Obviously you will also get my eternal thanks. Shouldnt be too hard for anyone with some knowledge.
Anyway here for the best translation I can make of the assignment:
Write a program that can calculate the maximum, minimum, sum, average of a given line of doubles in a row. (just getting it to calculate and show somewhere would already be good).
Example: { 7, 9,2 } should give Maximum 9.0, minimum 2.0, sum 18.0, average 6.
{ 0, .3, .4, 3, 4 } should give Max 4.0, min 0.0, sum 7.7, avg 1.54
{ -.4, -7, -9, -2 } should give : max -0.4, min -9.0, sum -18.4, avg-4.6
{ -3, -.4, -7, -9, -2 } should give: max -0.4, min -9.0, sum -21.4, avg -4.28
Any help is GREATLY appreciated! I'm using Java SE Development Kit (JDK) 6 Update 10 to write it in.
PLEASE! help, I'm desperate