Question
Write a program that prompts the user to enter a year, gender and name, then displays the ranking of the name for the selected year
Write a program that prompts the user to enter a year, gender and name, then displays the ranking of the name for the selected year and gender.
The data is to be stored in two arrays of maps, one for boys names and one for girls names. Each array must have one element for each of the 10 years of data. Each element in the array is a map (a class from the Java API that implements interface Map) that stores key / value pairs, each pair consisting of a name and its ranking, with the name serving as the key
This what the txt file looks like for year 2000
1 Jacob 30541 Emily 24450
2 Michael 28220 Madison 21771
3 Joshua 25965 Hannah 18802
4 Matthew 25142 Emma 16520
5 Ethan 22099 Alexis 15629
6 Andrew 21996 Ashley 15335
7 Joseph 21872 Abigail 15292
8 Christopher 21665 Sarah 14741
9 Nicholas 21380 Samantha 14652
10 Daniel 21291 Olivia 14627
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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