Problem

(Ranking summary) Write a program that uses the files described in Programming Exercise an...

(Ranking summary) Write a program that uses the files described in Programming Exercise and displays a ranking summary table for the first five girl’s and boy’s names as follows:

Programming Exercise (Baby name popularity ranking) The popularity ranking of baby names from years 2001 to 2010 are downloaded from www.ssa.gov/oact/Babynames and stored in files named Babynameranking2001.txt , Babynameranking2002.txt , …, and Babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy’s name, number for the boy’s name, a girl’s name, and the number for the girl’s name. For example, the first two lines in the file Babynameranking2010.txt are as follows:

So, the boy’s name Jacob and girl’s name Isabella are ranked #1 and the boy’s name Ethan and girl’s 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, followed by a name, and displays the ranking of the name for the year. Here is a sample run:

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT