Question: 1. implement a java stater program that accepts command line arguments with appropriate error handling 2. write code that reads input data from CSV file

1. implement a java stater program that accepts command line arguments with appropriate error handling
2. write code that reads input data from CSV file to construct a multidimensional array with appropriate error handling
1. implement a java stater program that accepts command line arguments with
appropriate error handling 2. write code that reads input data from CSV
file to construct a multidimensional array with appropriate error handling & 1

& 1 package cmsc256; // do not remove or comment out this statement 2 3 Commit 4 import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Scanner; 5 6 7 8 9 10 D D 11 12 I public class Project1 { public static void main(String[] args) { // Test your program thoroughly before submitting. // For example, // Display appropriately labeled information for the following: // What is tallest height? // Which row has the lowest weight? // calculate average height of 20-30 year age range in the data. } 13 14 15 16 e 17 e 18 19 20 21 * Gets the file name from command line argument; * If parameter is empty, call promptForFileName() method 22 * 23 * @param argv String array from command line argument * @return the name of the data file 24 25 26 public String checkArgs(String[] argv) { 27 28 e } 29 30 31 * Prompt user to enter a file name 32 * 33 34 * @return user entered file name */ public String promptForFileName() { 35 B 36 0-D public String promptForFileName() { e } /** * Retrieve file with the given file name. * Prompts user if file cannot be opened or does not exist. * Boran fileName The name of the data file * @return File object * @throws java.io.FileNotFoundException public File getFile(String fileName) throws FileNotFoundException { } /** * Reads the comma delimited file to extract the number data elements * provided in the second argument. * @param file The File object * @param numRecords The number of values to read from the input file * @return 20 array of data from the File * @throws IOException if any lines are missing data e public String[][] readFile(File file, int numRecords) throws IOException { } -D /** * Determines the tallest height in the data set * Height is the second field in each row * praram db 20 array of data containing Cage] [height] [weight] * @return Maximum height value UCLEI males no LULLOSE Wynt ! LIIC WULU Bot * Height is the second field in each row * @paran db 20 array of data containing Cage] [height] [weight] * @return Maximum height value A public int findTallest(String[][] db) { } /** * Returns the values in the record that have the lowest weight * @param db 20 array of data containing Cage) [height] [weight) * @return Smallest weight value */ public String[] findlightestRecord (String[][] db) { } e * /** * Calculates the average height for all records with the given age range. * @param db 20 array of data containing (age] [height] [weight] * @param LowerBound youngest age to include in the average * Boaram upperBound oldest age to include in the average * @return The average height for the given range or 8 if no * records match the filter criteria */ public double findAvgHeightByAgeRange(String[][] db, int LowerBound, int upperBound) { } A }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!