Revise Programming Exercise 21.11 to prompt the user to enter year, gender, and name and display the

Question:

Revise Programming Exercise 21.11 to prompt the user to enter year, gender, and name and display the ranking for the name. Prompt the user to enter another inquiry or exit the program. Here is a sample run:

Data from Programming Exercise 21.11

Use the data files from Programming Exercise 12.31 to write a program that enables the user to select a year, gender, and enter a name to display the ranking of the name for the selected year and gender, as shown in Figure 21.9. To achieve the best efficiency, create two arrays for boy’s names and girl’s names, respectively. Each array has 10 elements for 10 years. Each element is a map that stores a name and its ranking in a pair with the name as the key.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: