Results 1 to 2 of 2
Thread: Help with Java Project
- 12-03-2010, 05:06 AM #1
Member
- Join Date
- Oct 2010
- Location
- Baltimore, MD
- Posts
- 5
- Rep Power
- 0
Help with Java Project
Hey All,
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?
One method:
public static void main (String[] args)
//declaring the array and getting file name
Second method:
public static double readFile(double x[])
//returning the number of values read in from the array?
Thanks for any help in advance
- 12-03-2010, 05:37 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 19
Similar Threads
-
Need help on a Java project Please!!
By Aimuthe in forum New To JavaReplies: 2Last Post: 03-09-2010, 08:33 AM -
Use Java 2 Project in different IDE
By ramzansadiq in forum EclipseReplies: 8Last Post: 02-15-2009, 05:33 PM -
Help Java project.
By mandrake446 in forum New To JavaReplies: 1Last Post: 11-27-2007, 12:52 AM -
Java Project Help
By Gambit17 in forum New To JavaReplies: 3Last Post: 11-05-2007, 12:53 PM
Bookmarks