Question: Java Program Name: NameSearch (program file, output file, boys name file, girls name file) Write a program that reads the contents of the two files

Java

Program 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 your 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 girls names in alphabetical order.

Using the display method show the boys 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 boys and girls name list is in the array examples folder.

-The only string methods you are allowed to use are length charAt toUpperCase, toLowerCase, equals and compareTo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!