Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bluej code: babynameranking2001.txt, babynameranking 2002.txt.... babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy's name, number for the boy's name,

Bluej code:

image text in transcribed

babynameranking2001.txt, babynameranking 2002.txt.... babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy's name, number for the boy's name, a girl's name, and number for the girl's name. For example, the first two lines in the file babynameranking2010.txt are as follows: 1 Jacob 21,875 Isabella 22,731 2 Ethan 17,866 Sophia 20,477 So, the boy's name Jacob and girl's name Isabella are ranked #1 and the boy's name Ethan and girl's name Sophia are ranked #2. 21,875 boys are named Jacob and 22,731 girls are named Isabella. (Sort names without duplicates). Write a program that reads the names from the all the ten files described above, sorts all names (boy and girl names together, duplicates removed), and stores the sorted names in one file ten per line. Requirements: Use try-catch block and throw appropriate exception when the given information/data/filename is invalid. babynameranking2001.txt, babynameranking 2002.txt.... babynameranking2010.txt. Each file contains one thousand lines. Each line contains a ranking, a boy's name, number for the boy's name, a girl's name, and number for the girl's name. For example, the first two lines in the file babynameranking2010.txt are as follows: 1 Jacob 21,875 Isabella 22,731 2 Ethan 17,866 Sophia 20,477 So, the boy's name Jacob and girl's name Isabella are ranked #1 and the boy's name Ethan and girl's name Sophia are ranked #2. 21,875 boys are named Jacob and 22,731 girls are named Isabella. (Sort names without duplicates). Write a program that reads the names from the all the ten files described above, sorts all names (boy and girl names together, duplicates removed), and stores the sorted names in one file ten per line. Requirements: Use try-catch block and throw appropriate exception when the given information/data/filename is invalid

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

Step: 3

blur-text-image

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions