Question: Program Two Class Name: NameSearch (program file, output file, boys name file, girls name file) Write a program that reads the contents of the two
Program Two Class Name: NameSearch (program file, output file, boys name file, girls name file)
Write a program that reads the contents of the two files (GirlNames.txt and BoyNames.txt) into two separate arrays using method. Then you program should do the following
Write a method to sort the array.
Write a method to display the values of the array
Using the display method show the girl names in alphabetical order.
Using the display method show the boy names in alphabetical order
Write a method that asks the user to enter a boy name then search the boy names array and display the value if it is found.
Write a method that asks the user to enter a girl name then search the girl names array and display the value if it is found.
Write a method that asks the user to enter a matching string in boys name then search the boy names array for a match and display the values if it is found.(could be more than 1).
Write a method that asks the user to enter a matching string in girls name then search the girls names array for a match and display the values if it is found.(could be more than 1).
Test all methods in main using loop until user decides to stop for each search.
-The only string methods you are allowed to use are length charAt toUpperCase to LowerCase
equals and compareTo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
