my program discription is below i need to know how to store the rank, names in ana array either single array or 2d array .. anyone has an idea how to do it ?
please i need the help asap !! thank u
The text files USPopularNames2010.txt, contains a list of the 1,000 most popular boy and girl names in the United States for the year 2010 as compiled by the Social Security Administration.
These are blank-delimited files where the most popular boys and girls name is listed first, the second most popular boys and girls name is listed second, and so on, to the 1,000th most popular boys and girls name, which is listed last. Here is an example of one line: of the input file
30 Liam Sarah
This indicates that the 30th popular name for boys is Liam and for girls is Sarah
Note the first line of the file contains a description of the data, so you really want to skip reading the first line of the input file.
What you need to do:
• Write a program that will read the data from the files and store them into a either single or 2D arrays.
• If the file do not exist then display a message to the screen indicating the specific file name does not exist and
• update file errorLog.txt by appending the file name that caused the error, then terminate the program. The file errorLog.txt will contain the list of all the file names, each on a separate line, that this program had problems opening them for reading.
• On the other hand, if the file does exist then proceed to reading it into arrays then
o prompt the user to input a name .
o The program should search through the array(s).
If there is a match, then it should output the popularity ranking and whether it is a girl or boy name.
The program should also indicate if there is no match.
• The program should then prompt the user if they which to search for another name or end the program.