Your next checkpoint is to examine how baby-naming practiceshave changed in Amer
ID: 3614452 • Letter: Y
Question
Your next checkpoint is to examine how baby-naming practiceshave changed in America using data from the Social SecurityAdministration. Given a file containing the top 10 baby names for each year from 1880to 2008, create an array holding the rates for each year for a nameof your choosing. The file is formatted like so:
Write your code in the main method of a class namedNameTrend. Pseudocode is a good place to start:
There's a few ways the logic can be managed here, so find theway that makes sense to you. After you're done processing the file,print out the array in a table like so:
Explanation / Answer
please rate - thanks import java.util.*; import java.io.*; public class untitled {public static void main(String[] args)throwsFileNotFoundException {int i=-1,j; double[]year =new double[130]; String name,lookfor; double rate; Scanner input=new Scanner(System.in); Scanner in=new Scanner(new File("input.txt")); System.out.print("What name are you interested in finding? "); lookfor=input.next(); while(in.hasNextInt()) {i++; year[i]=0; in.nextInt(); for(j=0;jRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.