Question: Java: Write a program that reads the contents of two files, BoyNames.txt, and GirlNames.txt into separate ArrayLists. These 2 files contain the most popular boy
Java:
Write a program that reads the contents of two files, BoyNames.txt, and GirlNames.txt into separate ArrayLists. These 2 files contain the most popular boy and girl names (respectively) for the years 2000 through 2009.
After loading the 2 ArrayLists, prompt the user to enter one or more names. When the user does this, for each name entered, if the name is found in one of the ArrayLists, display a message indicating that the name was one of the most popular for boys or girls (depending on the ArrayList where the name was found). If a name is not found in either ArrayList, display a message indicating that the name was not a favorite name for boys or girls.
Each line of output should include the name, and whether or not it was a favorite name.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
