Project 8 Specifications Using OOP, write a C++ program that will read in a file of names and a file of birth years.  The file of names is called Names.txt and the file of birth years is called BirthYear.txt.  Both input files should be located in the current directory of your program.  The list of names in the Names.txt file corresponds to the list of birth years in the BirthYears.txt file.  This means: The first name in the names.txt file corresponds to the first birth year in the birthyear.txt file.  The second name in the names.txt file corresponds to the second birth year in the birthyear.txt file...and so on. Read in and store the names into an array of 30.  Next read in and store the birth years into another array of 30 integers. Sort the arrays using the selection sort or the bubblesort code found in your textbook.  List the roster of names in ascending alphabetical order displaying their birth years beside their names. Next, prompt the user to enter a birth year.  Validate this input value.  Valid birth years are between the years 1995 - 2005.   List each name who has the birth year entered by the user. A quick example: If the names.txt held the following 5 names: Jim Kevin Alexis Holly Sam and the birthyear.txt held the following 5 years: 1999 2001 1999 1997 2002 The output would be as follows: Alphabetical Roster of Names Alexis  1999 Holly   1997 Jim      1999 Kevin  2001 Sam    2002 Names by Birth Year Please enter the birth year:   abcd Invalid birth year entered, try again:  -30 Invalid birth year entered, try again:   97 Invalid birth year entered, try again:  2022 Invalid birth year entered, try again:  1999 For the birth year of 1999: Alexis Jim End of results Another example: Alphabetical Roster of Names Alexis  1999 Holly   1997 Jim      1999 Kevin  2001 Sam     2002 Names by Birth Year Please enter the birth year:  1996 No names with the birth year 1996. End of results NOTE:  Projects using global variables or not using a class and object appropriately will result in a grade submission of 0. Be sure to use private member variables and private member functions. Only the constructor (if needed) and the driver method are public.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question
Project 8 Specifications


Using OOP, write a C++ program that will read in a file of names and a file of birth years.  The file of names is called Names.txt and the file of birth years is called BirthYear.txt.  Both input files should be located in the current directory of your program. 
The list of names in the Names.txt file corresponds to the list of birth years in the BirthYears.txt file. 

This means:
The first name in the names.txt file corresponds to the first birth year in the birthyear.txt file. 
The second name in the names.txt file corresponds to the second birth year in the birthyear.txt file...and so on.

Read in and store the names into an array of 30.  Next read in and store the birth years into another array of 30 integers.

Sort the arrays using the selection sort or the bubblesort code found in your textbook.  List the roster of names in ascending alphabetical order displaying their birth years beside their names.

Next, prompt the user to enter a birth year.  Validate this input value.  Valid birth years are between the years 1995 - 2005.   List each name who has the birth year entered by the user.

A quick example:

If the names.txt held the following 5 names:

Jim
Kevin
Alexis
Holly
Sam

and the birthyear.txt held the following 5 years:

1999
2001
1999
1997
2002

The output would be as follows:

Alphabetical Roster of Names

Alexis  1999
Holly   1997
Jim      1999
Kevin  2001
Sam    2002


Names by Birth Year

Please enter the birth year:   abcd

Invalid birth year entered, try again:  -30
Invalid birth year entered, try again:   97
Invalid birth year entered, try again:  2022
Invalid birth year entered, try again:  1999

For the birth year of 1999:

Alexis
Jim


End of results


Another example:

Alphabetical Roster of Names

Alexis  1999
Holly   1997
Jim      1999
Kevin  2001
Sam     2002


Names by Birth Year

Please enter the birth year:  1996

No names with the birth year 1996.


End of results




NOTE:  Projects using global variables or not using a class and object appropriately will result in a grade submission of 0.
Be sure to use private member variables and private member functions.
Only the constructor (if needed) and the driver method are public.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Instruction Format
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education