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
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