Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Read in the input file creating a 2-dimensional String array from the data contained in the lines of the file using the designated methods to

  • Read in the input file creating a 2-dimensional String array from the data contained in the lines of the file using the designated methods to provide the functionality
  • Implement the functionality listed for each method
image text in transcribed
image text in transcribed
image text in transcribed
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 7 8 9 10 DD 11 12 I public class Projectif 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 24 * @param argv String array from command line argument * @return the name of the data file public String checkArgs(String[] argv) { 25 26 27 e 28 29 } 38 31 /** * Prompt user to enter a file name 32 * 33 34 e * @return user entered file name */ public String promptForFileName() { 35 36 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 * @poran 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 */ 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 * @param db 20 array of data containing Cage] [height] [weight] * @return Maximum height value VOLUITI COLLODE Home 1 LIIC ULU s * Height is the second field in each row * @paran db 20 array of data containing [age] [height] [weight] * @return Maximum height value 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 dota containing Cage] [height] [weight] * Bparam LowerBound youngest age to include in the average * @param upperBound oldest age to include in the average * @return the average height for the given range or 8 if no # records match the filter criterio */ public double findAvgHeightByAgeRange(String[][] db, int lowerBound, int upperBound) { } A }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago