Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Program within Eclipse. Babynames.txt:(Sharable Link to the text doc, just copy and paste into a .txt) https://docs.google.com/document/d/1oT30hSJTNdLQL1zEiX7ibazEXgc2q3Tl0TUwjtyVCe0/edit?usp=sharing Part II (80 Rts.) This assignment will
Java Program within Eclipse.
Babynames.txt:(Sharable Link to the text doc, just copy and paste into a .txt)
https://docs.google.com/document/d/1oT30hSJTNdLQL1zEiX7ibazEXgc2q3Tl0TUwjtyVCe0/edit?usp=sharing
Part II (80 Rts.) This assignment will explore use of TreeMap to store data and random access files. You are trying to select a name for your upcoming baby daughter and want to explore popular names used in your area. Text file habynames.txt contains 1000 names by popularity as well as number of babies given this name over the last year. In the sample below, boy name Jacob was most popular with 21,875 occurrences and girl name Isabella was most popular with 22,875 occurrences. Names with the same number of occurrences are arbitrarily ranked. 1 Jacob 21875 Isablla 22731 2 Ethan 17866 Sophia 20477 3 Mich 17133 Emma 17179 4 Jayden 17030 Olivia 16860 5 William 16870 Ava 15300 6 Alexander 16634 Emily 14172 7 Noah 16281 Abi 14172 8 Danicl 15679 Madison 13070 1. Use a TreeMap that stores baby girl names using the name as the key 2. Create a random access file that will store girl name information. Since each record must have the same length, pad names with blanks so cach name has fixed length 20. Names are stored by rank in the file so Isabella is first, Sophia is second, etc. 3. Run an interactive loop to test your data structures and allow the user to get information such as rank and number of occurrences for a given namc. The user can enter names using"Q" as the sentinel. For each name report: Is the name in the map? Report ranking, name, and number of occurrences from the map Report ranking, name, and number of occurrences from the random access file If not found, report a message that the name is not included 4. Allow the user to make their name choice. If the name is found, update the map and random access file by adding one to number of occurrences. If the ranking has now changed, be sure to adjust records in the random access file. If the name is not found, add the new record to the map and the random access file. 5. Report the status of the selected name by reporting information from both the map and the random access file to ensure it was correctly stored 6. Use the following names on the first test: Isabella Abigai Querty Mary Dania Part II (80 Rts.) This assignment will explore use of TreeMap to store data and random access files. You are trying to select a name for your upcoming baby daughter and want to explore popular names used in your area. Text file habynames.txt contains 1000 names by popularity as well as number of babies given this name over the last year. In the sample below, boy name Jacob was most popular with 21,875 occurrences and girl name Isabella was most popular with 22,875 occurrences. Names with the same number of occurrences are arbitrarily ranked. 1 Jacob 21875 Isablla 22731 2 Ethan 17866 Sophia 20477 3 Mich 17133 Emma 17179 4 Jayden 17030 Olivia 16860 5 William 16870 Ava 15300 6 Alexander 16634 Emily 14172 7 Noah 16281 Abi 14172 8 Danicl 15679 Madison 13070 1. Use a TreeMap that stores baby girl names using the name as the key 2. Create a random access file that will store girl name information. Since each record must have the same length, pad names with blanks so cach name has fixed length 20. Names are stored by rank in the file so Isabella is first, Sophia is second, etc. 3. Run an interactive loop to test your data structures and allow the user to get information such as rank and number of occurrences for a given namc. The user can enter names using"Q" as the sentinel. For each name report: Is the name in the map? Report ranking, name, and number of occurrences from the map Report ranking, name, and number of occurrences from the random access file If not found, report a message that the name is not included 4. Allow the user to make their name choice. If the name is found, update the map and random access file by adding one to number of occurrences. If the ranking has now changed, be sure to adjust records in the random access file. If the name is not found, add the new record to the map and the random access file. 5. Report the status of the selected name by reporting information from both the map and the random access file to ensure it was correctly stored 6. Use the following names on the first test: Isabella Abigai Querty Mary DaniaStep 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