(C++) Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the most
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
(C++) Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the most
(C++) Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the most popular names for boys and girls, ranked according to their popularity.The user should be able to choose whether to look for boys’ names or girls’ names and to specify which letter of the alphabet the names should begin with. E.g. I may want to look for girls’ names starting with an ‘E’. Your program should copy the names that satisfy the user’s criteria (girls’ names starting with an ‘E’ in my example) to another file and include the ranking allocated to the name.E.g. if BabyNames.dat contains the following data showing that James is the most popular boys’ name and Ellen the most popular girls’ name, with Michael and Nazeerain the 10th place:1 James Ellen2 Peter Eleanor3 Rodger Mary4 John Elise5 Mpho Anne6 Molefe Ella7 Zaheer Petunia8 Charles Eugenie9Tabang Charlotte10 Michael NazeeraThe output file should look as follows, showing all the names starting with an ‘E’ and their rank:1 Ellen2 Eleanor4 Elise6 Ella8 EugenieYou need to have plan for your program as well as the actual program code, input and output. Planning your program can take the form of a flowchart, pseudocode, or notes to guide you in the development of the program.