Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3: Work exercise 12.32, page 493, to design and implement a program to process data from a given text file (used in the previous

Exercise 3: Work exercise 12.32, page 493, to design and implement a program to process data from a given text file (used in the previous exercise). See problem statement for details and output format. Make your program modular using separate methods to perform specific tasks, such as reading the names from the files and writing the output table. Use exception handlings as needed.

(Baby name popularity ranking) The popularity ranking of baby names from years 2001 to 2010 is downloaded from www.ssa.gov/oact/babynames and stored in files named babynameranking2001.txt, babynameranking2002.txt, . . . , babynameranking2010.txt. 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:

image text in transcribed

(Ranking summary) Write a program that uses the files described in Programming Exercise 12.31 and displays a ranking summary table for the first five girls and boys names as follows:

image text in transcribed

the Hame for t ol the name Tor the year. Here is a sample run Enter the year: 2010 Enter Enter the gender: M Enter Enter the name: Javier Enter Javier is ranked #190 in year 2010 Enter the year: 2010 Enter Enter the gender: F Ee Enter the name:ABC Enter The name ABC is not ranked in year 2010

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions