Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. The text files boynames.txt and girlnames.txt, which are included in the source code for this book text, contain a list of the 1,000 most

image text in transcribed

1. The text files boynames.txt and girlnames.txt, which are included in the source code for this book text, contain a list of the 1,000 most popular boy and girl names in the United States for the year 2003 as compiled by the Social Security Administration These are blank-delimited files, where the most popular nan second most popular name is listed second, and so on, to the 1,000th most popular name, which is listed last. Each line consists of the first name followed by a blank space and then the number of registered births using that name in the year. For example, the girlnames.txt file begins with e is listed first, the Emily 25494 Emma 22532 Madison 19986 This indicates that Emily was the most popular name with 25,494 registered namings, Emma was the second most popular with 22,532, and Madison was the third most popular with 19,986 Write a program that reads both the girl and boy files into memory using arrays. Then, allow the user to input a name. The program should search through both arrays. If there is a match, then it should output the popularity ranking and the number of namings. The program should also indicate if there is no match For example, if the user enters the name "Justice," then the program should output Justice is ranked 456 in popularity among girls with 655 namings Justice is ranked 401 in popularity among boys with 653 namings. If the user enters the name "Walter," then the program should output Walter is not ranked among the top 1000 girl names Walter is ranked 356 in popularity among boys with 775 namings

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_2

Step: 3

blur-text-image_3

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

b. Will there be one assigned leader?

Answered: 1 week ago

Question

d. How will lack of trust be handled?

Answered: 1 week ago

Question

b. Does senior management trust the team?

Answered: 1 week ago