Help with Java Project
I have a Java project I am working on for class and could use some help with clarification. Here is a breakdown of the Project, it is a program that will use a class called Stat using 5 methods, and Main which declares the arrary etc.:
Stat Class does this:
1. (getCount) returns the value of count
2. (calcAvg) calculates average of numbers in arrary
3. (calcMedian) calculates median of numbers in the array
4. (findMax) finds max value of array
5. (findMin) finds min value of array
Main does this:
1. Declares an arrary of 20 doubles
2. requests name of 1 of 2 data files supplied by teacher (with even/odd number of doubles)
3.**the part that is stumping me*** says this:
"Call the readFile method that is part of the main driver file, sending a reference to the double array and the fielname entered by the user. The readFile method returns the number of values read from the file into the arrary."
Does this mean that I need to have two methods under Main?
public static void main (String args)
//declaring the array and getting file name
public static double readFile(double x)
//returning the number of values read in from the array?
Thanks for any help in advance
Yes I think you have understood it correctly.