todd stolz-schroeder wrote:
I have my whole program written but i need to break it down into 5 seperate methods one for the values, one for the average, one for the smallest, one for the largest and one for the median. im a little confused on how to do it, thanks.
SCJP-6.0 OCPJWCD-5.0
Campbell Ritchie wrote:It helps nobody to be given such an answer; in fact if it is found out it will earn anybody using it a mark of 0.
Yeah get that but i dont know what the write code for it would be and where to put it I worked on this all day yesterday and just wannna get it doneAnupam Jain wrote:
todd stolz-schroeder wrote:
I have my whole program written but i need to break it down into 5 seperate methods one for the values, one for the average, one for the smallest, one for the largest and one for the median. im a little confused on how to do it, thanks.
You have the answer in your question itself...
try to make the array reference variable as a class member. make five methods as:
getValues() //To store values in array
getAverage() //to find the average value
getSmallest() //to find the smallest value
getLargest() //to find the largest value
getMedian() //to find the Median value
Hope it helps....
David Newton wrote:Oh, that's obnoxious--just cut-and-paste next time, please.
Are you calling the functions? They won't call themselves.
todd stolz-schroeder wrote:You cant copy out of the command promt so thats what i had to do.
BEE MBA PMP SCJP-6
todd stolz-schroeder wrote:
David Newton wrote:Oh, that's obnoxious--just cut-and-paste next time, please.
Are you calling the functions? They won't call themselves.
You cant copy out of the command promt so thats what i had to do.
And i added the return command and still the same thing
SCJP-6.0 OCPJWCD-5.0
todd stolz-schroeder wrote:You cant copy out of the command promt so thats what i had to do.
Joanne
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|