IN C++ Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the mos
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
IN C++ Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the mos
IN C++ Write a program to help new parents find a name fortheir baby. The file BabyNames.dat contains a list of the mostpopular names for boys and girls, ranked according to theirpopularity. The user should be able to choose whether to look forboys’ names or girls’ names and to specify which letter of thealphabet the names should begin with. E.g. I may want to look forgirls’ names starting with an ‘E’. Your program should copy thenames that satisfy the user’s criteria (girls’ names starting withan ‘E’ in my example) to another file and include the rankingallocated to the name. E.g. if BabyNames.dat contains the followingdata showing that James is the most popular boys’ name and Ellenthe most popular girls’ name, with Michael and Nazeera in the 10thplace: 1 James Ellen 2 Peter Eleanor 3 Rodger Mary 4 John Elise 5Mpho Anne 6 Molefe Ella 7 Zaheer Petunia 8 Charles Eugenie 9 TabangCharlotte 10 Michael Nazeera The output file should look asfollows, showing all the names starting with an ‘E’ and their rank:1 Ellen 2 Eleanor 4 Elise 6 Ella 8 Eugenie NB: First plan yourprogram on paper (using your computational thinking to do so). Youhave to submit your plan for your program as well as the actualprogram code, input and output. Planning your program can take theform of a flowchart, pseudocode, or notes to guide you in thedevelopment of the program.