subject

If you have downloaded the source code from this book's companion web site, you will find the following files in the Chapter 07 folder: GirlNames. txt--This file contains a list of the 200 most popular names given to girls born in the United States from the year 2000 through 2009.
BoyNames. txt--This file contains a list of the 200 most popular names given to boys born in the United States from the year 2000 through 2009.
Write a program that reads the contents of the two files into two separate lists, allows a user to input either a girl's name, a boy's name, or both, then tells the user whether the name(s) was/were popular between 2000 and 2009.
First, the program should prompt the user to choose a girl's name, a boy's name, or both by entering either 'girl', 'boy', or 'both.'
Once they have chosen, they should be able to input a name. If the name was a popular name, like Jacob or Sophia, the program should print "Jacob was a popular boy's name between 2000 and 2009." or "Sophia was a popular girl's name between 2000 and 2009."
If the name was not a popular name, like Voldemort, the program should print "Voldemort was not a popular boy's name between 2000 and 2009."
If the user chooses to input both a girl and boy's name, ask for the boy's name, then the girl's name, and print two statements in the form mentioned above on two separate lines, with the statement about the boy's name coming first. For example, if the user inputs Voldemort and then Sophia, print:
Voldemort was not a popular boy's name between 2000 and 2009. Sophia was a popular girl's name between 2000 and 2009.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
question
Computers and Technology, 24.06.2019 21:30
What need most led to the creation of the advanced research projects agency network? darpa wanted scientists to be able to collaborate and share research easily. darpa wanted american and russian politicians to be able to communicate. darpa wanted astronauts to be able to contact nasa and the white house. darpa wanted factory owners to be able to coordinate supply chains.
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
True or false technology is often discovered by accident
Answers: 2
You know the right answer?
If you have downloaded the source code from this book's companion web site, you will find the follow...
Questions
question
Mathematics, 08.12.2021 05:10
question
English, 08.12.2021 05:10
question
History, 08.12.2021 05:10