Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Analysis of the following question: 2 View as TextDownload Project 1 (Baby name popularity ranking) The popularity ranking of baby names from years 2001 to

Analysis of the following question: 2 View as TextDownload Project 1 (Baby name popularity ranking) The popularity ranking of baby names from years 2001 to 2010 (downloadable from www.ssa.gov/oact/babynames) and stored in files named babynameranking2001.txt, babynameranking2002.txt, ..., babynameranking2010.txt in the zip file with this project. Each file contains one thousand lines. Each line contains a ranking, a boys name, number for the boys name, a girls name, and number for the girls name. For example, the first two lines in the file babynameranking2010.txt are as follows: 1 Jacob 21,875 Isabella 22,731 2 Ethan 17,866 Sophia 20,477 So, the boys name Jacob and girls name Isabella are ranked #1 and the boys name Ethan and girls name Sophia are ranked #2. 21,875 boys are named Jacob and 22,731 girls are named Isabella. Write a program that prompts the user to enter the year, gender, and followed by a name, and displays the ranking of the name for the year. Here is a sample run: Enter the year: 2010 Enter the gender: M Enter the name: Javier Javier is ranked #190 in year 2010 Enter the year: 2010 Enter the gender: F Enter the name: ABC The name ABC is not ranked in year 2010 You can download the files from www.cs.armstrong.edu/liang/data/babynameranking2001.txt www.cs.armstrong.edu/liang/data/babynameranking2002.txt ... www.cs.armstrong.edu/liang/data/babynameranking2010.txt Hint: Create two two-dimensional arrays to store names: String[][] boyNames = new String[10][1000]; String[][] girlNames = new String[10][1000]; boyNames[0][0] is the name rank #1 for year 2001. boyNames[9][10] is the name rank #11 for year 2010. girlNames[3][8] is the name rank #9 for year 2004. girlNames[5][342] is the name rank #343 for year 2006. Submit the following items: 1. Compile and Submit your source code to eConestoga (You must submit the program regardless whether it complete or incomplete, correct or incorrect) 2. Submit hard copies of screenshots of sample run from the command prompt. 3. Fill in self-evaluation: (Write the self-evaluation for the screenshots) 1. Can your program read data from the files and store the data in arrays? 2. Can your program find a rank for a name?

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

Students also viewed these Databases questions