Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is my code: /* * /** * This assignment is to provide practice in using the

ID: 3833228 • Letter: H

Question

Here is my code: /* * /** * This assignment is to provide practice in using the Java I/O techniques * discussed in the Module 10 video lectures and readings. Although the main * focus of this assignment is Java I/O techniques, Java design and * implementation techniques discussed in earlier modules should be incorporated * in to this assignment.Supplied is a data file from the US Census which * contains data from US school districts and reports statistics related to * child poverty * Problem: Supplied is a data file from the US Census which contains data from * US school districts and reports statistics related to child poverty * (http://www.census.gov/did/www/saipe/data/highlights/2013.html). It is * desired to have a summary report which calculate basic statistics at the * state level. * There should be two separate “programs� (main()), one to read the text data * file and write a reformatted file to be read by the second program which will * create the report to standard out. Note before the report is displayed, a * single line with “File: “ then the path of the input file for the report is * displayed. * * This is the second program in the assignment which reads the text data file * and writes a reformatted file. There are 2-runtime parameters: * the input file path (path), the destination file path, and * the number of records in data file (13486) . * 2 run-time parameters, the input file path and the number of records. * @param: path_to_read: the input file path (path) * @param: numberOfRecords = the number of records in the data file (13486) ; * Assignment 10 US Census Bureau Data * @author Deb Ripley */ package eng605.assignment10v2; import java.io.*; import java.util.Scanner; public class JavaApplication15 { private static File sf; private static PrintWriter df; public static void main(String[] args) throws IOException { int numberOfLines = 13486; //from program 1 int i = 0;//from program 1 //**********************S O U R C E F I L E ********************************* //source file or input file Scanner input = new Scanner (System.in ); System.out.println( "Enter the name of you path and source filename: " ); String fileName = input.next(); while ( input.hasNext() ) { String FIPS_code = input.next(); String DISTRICT_id = input.next(); String Name = input.next(); String County_city = input.next(); String School = input.next(); String District = input.next(); String POPULATION = input.next(); String CHILD_POPULATION = input.next(); String CHILD_POV_POP = input.next(); String fCode = input.next(); String sDate = input.next(); if(input.next()==null) break; //*********************D E S T I N A T I O N F I L E ************************ //destination file or output file or destination file //*********************P R I N T T O O U T P U T F I L E **************** PrintWriter df = new PrintWriter ( "C:\eng605\assignment10v2\Poverty_Data.txt" ); //Write to an output file df.printf("Destination file: " + df); df.printf(" STATE CODE TOTAL POPULATION CHILD POPULATION AGES 5-17 CHILD POVERTY POPULATION AGES 5-17"); df.printf( " " ); //Write to an output file df.printf("Destination file: " + df); df.printf(" STATE CODE TOTAL POPULATION CHILD POPULATION AGES 5-17 CHILD POVERTY POPULATION AGES 5-17"); df.printf( " " ); df.printf(" "+" "+" %02s %10s %10s %10s %n",FIPS_code, POPULATION, CHILD_POPULATION, CHILD_POV_POP); } } }

Explanation / Answer


class JavaProgram
{
public static void main(String[] args)
{
try
{
File f3 = new File("d:/myfile.txt");
BufferedReader br = new BufferedReader(new FileReader(f3)) ;
String strg;
while ((str=br.readLine())!=null)
{
System.out.println(str);
}
br.close();
fl.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote