import java.util.Scanner; import java.io.*; /** * Hmwk15 introduces two-dimensional arrays. * * @author D. Searls * @version 04/2007 */ public class Hmwk15 { private static final int MAXSIZE = 100; /** * Main driver begins program execution. * * @param args program arguments */ public static void main(String[] args) throws Exception { double[][] data = new double[MAXSIZE][2]; int n; n = readFile(data); System.out.println(); System.out.format("r = %6.4f", pearsonR(data, n)); System.out.println(); } /** * Read a file of paired data into the specified two-dimensional * array and return the number of data pairs read from the file. * This method asks the user for the name of the data file. * * @param data the two-dimensional array to store the paired data * @return the number of data pairs read from the file */ private static int readFile(double[][] data) throws Exception { } /** * Return the Pearson Product Moment Correlation Coefficient. * * @param data the paired data * @param n the number of data pairs * @return the Pearson r correlation coefficient */ private static double pearsonR(double[][] data, int n) { } }