Results 1 to 2 of 2
  1. #1
    j@v@ is offline Member
    Join Date
    Oct 2010
    Baltimore, MD
    Rep Power

    Default 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

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

Similar Threads

  1. Need help on a Java project Please!!
    By Aimuthe in forum New To Java
    Replies: 2
    Last Post: 03-09-2010, 08:33 AM
  2. Use Java 2 Project in different IDE
    By ramzansadiq in forum Eclipse
    Replies: 8
    Last Post: 02-15-2009, 05:33 PM
  3. Help Java project.
    By mandrake446 in forum New To Java
    Replies: 1
    Last Post: 11-27-2007, 12:52 AM
  4. Java Project Help
    By Gambit17 in forum New To Java
    Replies: 3
    Last Post: 11-05-2007, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts