JAVA PROGRAM   Homework #2. Chapter 7. PC #13. Name Search (page 492) Read these instructions for additional requirements carefully. Write a program that reads the contents of the two files into two separate arrays. The user should be able to enter a name the application will display messages indicating whether the names were among the most popular. 1. GirlNames.txt and BoyNames.txt contain a list of the 200 most popular names given to girls/boys born in the United States for the years 2000 through 2009. 2. Your application should use an array to hold the names. 3. The program should continue interacting with the user indefinitely unless the user chooses to quit by entering "QUIT" (should be case insensitive). 4. The user should enter a single name and the program will search the name in both lists. The user SHOULD NOT specify whether the search is for girls name or boys name. The program is responsible for finding either or both and telling the user where it found it. 5. The program should display one of the following four results (examples): * The name 'Annabelle' was not found in either list. * The name 'Xavier' was found in popular boy names list (line 81). * The name 'Amanda' was found in popular girl names list (line 63). * The name 'Jordan' was found in both lists: boy names (line 38) and girl names (line 75). 6. The search should be case insensitive, but the resulting message should always display names in properly capitalized format (the first letter uppercase all others lowercase). 7. The files should only be opened/loaded and closed once per program session (at the beginning of the program execution). During the search the files should be closed. 8. If any or both of the files are missing, display a message to the user informing which file is missing or if both files are missing and exit the program. 9. Your program should contain properly defined and used methods. For example, your program should have a method that loads a file into an array. This method should take one parameter for the file name to be loaded and return an array of Strings. Another method should take a name and an array reference and perform a search and return results to the calling method. 10. Do not upload input text files.   I HAVE PROVIDED A SCRRENSHOT OF THE TEST CASE THAT IT NEEDS TO PASS.   Boynames.txt   Jacob Michael Joshua Matthew Daniel Christopher Andrew Ethan Joseph William Anthony David Alexander Nicholas Ryan Tyler James John Jonathan Noah Brandon Christian Dylan Samuel Benjamin Zachary Nathan Logan Justin Gabriel Jose Austin Kevin Elijah Caleb Robert Thomas Jordan Cameron Jack Hunter Jackson Angel Isaiah Evan Isaac Mason Luke Jason Gavin Jayden Aaron Connor Aiden Aidan Kyle Juan Charles Luis Adam Lucas Brian Eric Adrian Nathaniel Sean Alex Carlos Bryan Ian Owen Jesus Landon Julian Chase Cole Diego Jeremiah Steven Sebastian Xavier Timothy Carter Wyatt Brayden Blake Hayden Devin Cody Richard Seth Dominic Jaden Antonio Miguel Liam Patrick Carson Jesse Tristan Alejandro Henry Victor Trevor Bryce Jake Riley Colin Jared Jeremy Mark Caden Garrett Parker Marcus Vincent Kaleb Kaden Brady Colton Kenneth Joel Oscar Josiah Jorge Cooper Ashton Tanner Eduardo Paul Edward Ivan Preston Maxwell Alan Levi Stephen Grant Nicolas Omar Dakota Alexis George Collin Eli Spencer Gage Max Cristian Ricardo Derek Micah Brody Francisco Nolan Ayden Dalton Shane Peter Damian Jeffrey Brendan Travis Fernando Peyton Conner Andres Javier Giovanni Shawn Braden Jonah Cesar Bradley Emmanuel Manuel Edgar Erik Mario Edwin Johnathan Devon Erick Wesley Oliver Trenton Hector Malachi Jalen Raymond Gregory Abraham Elias Leonardo Sergio Donovan Colby Marco Bryson Martin   Girlnames.txt   Emily Madison Emma Olivia Hannah Abigail Isabella Samantha Elizabeth Ashley Alexis Sarah Sophia Alyssa Grace Ava Taylor Brianna Lauren Chloe Natalie Kayla Jessica Anna Victoria Mia Hailey Sydney Jasmine Julia Morgan Destiny Rachel Ella Kaitlyn Megan Katherine Savannah Jennifer Alexandra Allison Haley Maria Kaylee Lily Makayla Brooke Mackenzie Nicole Addison Stephanie Lillian Andrea Zoe Faith Kimberly Madeline Alexa Katelyn Gabriella Gabrielle Trinity Amanda Kylie Mary Paige Riley Jenna Leah Sara Rebecca Michelle Sofia Vanessa Jordan Angelina Caroline Avery Audrey Evelyn Maya Claire Autumn Jocelyn Ariana Nevaeh Arianna Jada Bailey Brooklyn Aaliyah Amber Isabel Danielle Mariah Melanie Sierra Erin Molly Amelia Isabelle Madelyn Melissa Jacqueline Marissa Shelby Angela Leslie Katie Jade Catherine Diana Aubrey Mya Amy Briana Sophie Gabriela Breanna Gianna Kennedy Gracie Peyton Adriana Christina Courtney Daniela Kathryn Lydia Valeria Layla Alexandria Natalia Angel Laura Charlotte Margaret Cheyenne Mikayla Miranda Naomi Kelsey Payton Ana Alicia Jillian Daisy Mckenzie Ashlyn Caitlin Sabrina Summer Ruby Rylee Valerie Skylar Lindsey Kelly Genesis Zoey Eva Sadie Alexia Cassidy Kylee Kendall Jordyn Kate Jayla Karen Tiffany Cassandra Juliana Reagan Caitlyn Giselle Serenity Alondra Lucy Kiara Bianca Crystal Erica Angelica Hope Chelsea Alana Liliana Brittany Camila Makenzie Veronica Lilly Abby Jazmin Adrianna Karina Delaney Ellie Jasmin

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter9: Sequential Access Files And Menus
Section: Chapter Questions
Problem 2E
icon
Related questions
Question
JAVA PROGRAM
 
Homework #2. Chapter 7. PC #13. Name Search (page 492)
Read these instructions for additional requirements carefully.
Write a program that reads the contents of the two files into two separate arrays. The user should be able to enter a name the application will display messages indicating whether the names were among the most popular.
1. GirlNames.txt and BoyNames.txt contain a list of the 200 most popular names given to girls/boys born in the United States for the years 2000 through 2009.
2. Your application should use an array to hold the names.
3. The program should continue interacting with the user indefinitely unless the user chooses to quit by entering "QUIT" (should be case insensitive).
4. The user should enter a single name and the program will search the name in both lists. The user SHOULD NOT specify whether the search is for girls name or boys name. The program is responsible for finding either or both and telling the user where it found it.
5. The program should display one of the following four results (examples):
* The name 'Annabelle' was not found in either list.
* The name 'Xavier' was found in popular boy names list (line 81).
* The name 'Amanda' was found in popular girl names list (line 63).
* The name 'Jordan' was found in both lists: boy names (line 38) and girl names (line 75).
6. The search should be case insensitive, but the resulting message should always display names in properly capitalized format (the first letter uppercase all others lowercase).
7. The files should only be opened/loaded and closed once per program session (at the beginning of the program execution). During the search the files should be closed.
8. If any or both of the files are missing, display a message to the user informing which file is missing or if both files are missing and exit the program.
9. Your program should contain properly defined and used methods. For example, your program should have a method that loads a file into an array. This method should take one parameter for the file name to be loaded and return an array of Strings. Another method should take a name and an array reference and perform a search and return results to the calling method.
10. Do not upload input text files.
 
I HAVE PROVIDED A SCRRENSHOT OF THE TEST CASE THAT IT NEEDS TO PASS.
 
Boynames.txt
 
Jacob
Michael
Joshua
Matthew
Daniel
Christopher
Andrew
Ethan
Joseph
William
Anthony
David
Alexander
Nicholas
Ryan
Tyler
James
John
Jonathan
Noah
Brandon
Christian
Dylan
Samuel
Benjamin
Zachary
Nathan
Logan
Justin
Gabriel
Jose
Austin
Kevin
Elijah
Caleb
Robert
Thomas
Jordan
Cameron
Jack
Hunter
Jackson
Angel
Isaiah
Evan
Isaac
Mason
Luke
Jason
Gavin
Jayden
Aaron
Connor
Aiden
Aidan
Kyle
Juan
Charles
Luis
Adam
Lucas
Brian
Eric
Adrian
Nathaniel
Sean
Alex
Carlos
Bryan
Ian
Owen
Jesus
Landon
Julian
Chase
Cole
Diego
Jeremiah
Steven
Sebastian
Xavier
Timothy
Carter
Wyatt
Brayden
Blake
Hayden
Devin
Cody
Richard
Seth
Dominic
Jaden
Antonio
Miguel
Liam
Patrick
Carson
Jesse
Tristan
Alejandro
Henry
Victor
Trevor
Bryce
Jake
Riley
Colin
Jared
Jeremy
Mark
Caden
Garrett
Parker
Marcus
Vincent
Kaleb
Kaden
Brady
Colton
Kenneth
Joel
Oscar
Josiah
Jorge
Cooper
Ashton
Tanner
Eduardo
Paul
Edward
Ivan
Preston
Maxwell
Alan
Levi
Stephen
Grant
Nicolas
Omar
Dakota
Alexis
George
Collin
Eli
Spencer
Gage
Max
Cristian
Ricardo
Derek
Micah
Brody
Francisco
Nolan
Ayden
Dalton
Shane
Peter
Damian
Jeffrey
Brendan
Travis
Fernando
Peyton
Conner
Andres
Javier
Giovanni
Shawn
Braden
Jonah
Cesar
Bradley
Emmanuel
Manuel
Edgar
Erik
Mario
Edwin
Johnathan
Devon
Erick
Wesley
Oliver
Trenton
Hector
Malachi
Jalen
Raymond
Gregory
Abraham
Elias
Leonardo
Sergio
Donovan
Colby
Marco
Bryson
Martin
 
Girlnames.txt
 
Emily
Madison
Emma
Olivia
Hannah
Abigail
Isabella
Samantha
Elizabeth
Ashley
Alexis
Sarah
Sophia
Alyssa
Grace
Ava
Taylor
Brianna
Lauren
Chloe
Natalie
Kayla
Jessica
Anna
Victoria
Mia
Hailey
Sydney
Jasmine
Julia
Morgan
Destiny
Rachel
Ella
Kaitlyn
Megan
Katherine
Savannah
Jennifer
Alexandra
Allison
Haley
Maria
Kaylee
Lily
Makayla
Brooke
Mackenzie
Nicole
Addison
Stephanie
Lillian
Andrea
Zoe
Faith
Kimberly
Madeline
Alexa
Katelyn
Gabriella
Gabrielle
Trinity
Amanda
Kylie
Mary
Paige
Riley
Jenna
Leah
Sara
Rebecca
Michelle
Sofia
Vanessa
Jordan
Angelina
Caroline
Avery
Audrey
Evelyn
Maya
Claire
Autumn
Jocelyn
Ariana
Nevaeh
Arianna
Jada
Bailey
Brooklyn
Aaliyah
Amber
Isabel
Danielle
Mariah
Melanie
Sierra
Erin
Molly
Amelia
Isabelle
Madelyn
Melissa
Jacqueline
Marissa
Shelby
Angela
Leslie
Katie
Jade
Catherine
Diana
Aubrey
Mya
Amy
Briana
Sophie
Gabriela
Breanna
Gianna
Kennedy
Gracie
Peyton
Adriana
Christina
Courtney
Daniela
Kathryn
Lydia
Valeria
Layla
Alexandria
Natalia
Angel
Laura
Charlotte
Margaret
Cheyenne
Mikayla
Miranda
Naomi
Kelsey
Payton
Ana
Alicia
Jillian
Daisy
Mckenzie
Ashlyn
Caitlin
Sabrina
Summer
Ruby
Rylee
Valerie
Skylar
Lindsey
Kelly
Genesis
Zoey
Eva
Sadie
Alexia
Cassidy
Kylee
Kendall
Jordyn
Kate
Jayla
Karen
Tiffany
Cassandra
Juliana
Reagan
Caitlyn
Giselle
Serenity
Alondra
Lucy
Kiara
Bianca
Crystal
Erica
Angelica
Hope
Chelsea
Alana
Liliana
Brittany
Camila
Makenzie
Veronica
Lilly
Abby
Jazmin
Adrianna
Karina
Delaney
Ellie
Jasmin
Test Case 1
Enter a name to search or type QUIT to exit: \n
Annabelle ENTER
The name 'Annabelle' was not found in either list.\n
Enter a name to search or type QUIT to exit: \n
xavier ENTER
The name 'Xavier' was found in popular boy names list (line 81).\n
Enter a name to search or type QUIT to exit: \n
AMANDA ENTER
The name 'Amanda' was found in
Enter a name to search or type
jordAn ENTER
popular girl names list (line 63). \n
QUIT to exit: \n
The name 'Jordan' was found in both lists: boy names (line 38) and girl names (line 75). \n
Enter a name to search or type QUIT to exit: \n
quit ENTER
Transcribed Image Text:Test Case 1 Enter a name to search or type QUIT to exit: \n Annabelle ENTER The name 'Annabelle' was not found in either list.\n Enter a name to search or type QUIT to exit: \n xavier ENTER The name 'Xavier' was found in popular boy names list (line 81).\n Enter a name to search or type QUIT to exit: \n AMANDA ENTER The name 'Amanda' was found in Enter a name to search or type jordAn ENTER popular girl names list (line 63). \n QUIT to exit: \n The name 'Jordan' was found in both lists: boy names (line 38) and girl names (line 75). \n Enter a name to search or type QUIT to exit: \n quit ENTER
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage