Question
Files: babynameranking2001.txt babynameranking2002.txt .. babynameranking2010.txt The popularity ranking of baby names from years 2001 to 2010 are stored in these files. Each file contains one
Files: babynameranking2001.txt babynameranking2002.txt .. babynameranking2010.txt The popularity ranking of baby names from years 2001 to 2010 are stored in these files. 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,73 |
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.
A):Baby name popularity ranking Write a java program that 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.(Add additional note to explain what is happened in the program) Here is a sample run:
B) Name for both genders Write ajava program that prompts the user to enter one of the filenames and displays the names that are used for both genders in the file. Use sets to store names and find common names in two sets.(Add additional note to explain what is happened in the program) Here is a sample run:
Enter the year: 2010 Enter Enter the gender: M Enter the name: JavierEnte Boy name Javier is ranked #190 in year 2010 Enter another inquiry? Y Enter the year: 2001Enter Enter the gender: F Enier Enter the name: Emily Girl name Emily is ranked #1 in year 2001 Enter another inquiry? N Erter Enter Enter the year: 2010 Enter Enter the gender: M Enter the name: JavierEnte Boy name Javier is ranked #190 in year 2010 Enter another inquiry? Y Enter the year: 2001Enter Enter the gender: F Enier Enter the name: Emily Girl name Emily is ranked #1 in year 2001 Enter another inquiry? N Erter EnterStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started