Write a C++ program using object-oriented principles that will display the National Champion of NCAA College Football for the year the user enters.  The valid years that may be entered are from 1998 - 2022. An input file - named NationalChampionship.txt - has been created that contains:  the year and the school team that won the National Championship.  It should be located in the current directory. To begin, the program should declare two arrays:  one array to hold the year and another array to hold the school and team name. Populate the arrays with the values read in from the input file.  Close the input file. Next, the program should prompt the user to enter a year.  Validate the user's input value.  If the user enters an invalid year, display an error message and let the user retry as many times as needed. When a good input year is entered, the program must find the corresponding year in the first array.  Then, the program must look in the second array to find the name of the team that won the national championship for that year.  Display that value. Continue to prompt the user for another year until the user wishes to stop.  Make it clear how you would like for the user to stop. A sample output: National Championship Inquiry Reading the input file... Enter a year between 1998 - 2022 to find the champion (press -99 to stop):  2008 The Florida Gators were the National Champions in 2008. Enter a year between 1998 - 2022 to find the champion (press -99 to stop): -1999 Invalid input, try again:   two thousand Invalid input, try again:   tell me!!!! Invalid input, try again:   2016 The Clemson Tigers were the National Champions in 2016. Enter a year between 1998 - 2022 to find the champion (press -99 to stop):  -99 New Year, New Team, One Dream! At a minimum, the class should have: private member variables:     an array that holds the year     an array to hold the school and team name     the input file private member functions:     file maintenance (opening the file, testing the file opened properly, reading the file, closing the file)     display method public member functions:      a constructor - if needed     driver method main() should only contain the instantiated object of the class, a call to the driver method, a system pause command, and a return statement.  Add comments. NOTE:  Any submitted program that does not use OOP appropriately will result in a grade of 0. To Do: Upload your cpp file to the Project 7 Drop Box. Be sure to check the Rubrics before you submit your Project. Rubrics tell you exactly what must be included in each Project and how much each item is worth. Check the Calendar for the due date! Be sure to use the template code (the file called template code under Visual Studio in Modules).

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Topic Video
Question

Write a C++ program using object-oriented principles that will display the National Champion of NCAA College Football for the year the user enters.  The valid years that may be entered are from 1998 - 2022.

An input file - named NationalChampionship.txt - has been created that contains:  the year and the school team that won the National Championship.  It should be located in the current directory.

To begin, the program should declare two arrays:  one array to hold the year and another array to hold the school and team name.
Populate the arrays with the values read in from the input file.  Close the input file.

Next, the program should prompt the user to enter a year.  Validate the user's input value.  If the user enters an invalid year, display an error message and let the user retry as many times as needed.

When a good input year is entered, the program must find the corresponding year in the first array.  Then, the program must look in the second array to find the name of the team that won the national championship for that year.  Display that value.

Continue to prompt the user for another year until the user wishes to stop.  Make it clear how you would like for the user to stop.

A sample output:

National Championship Inquiry

Reading the input file...

Enter a year between 1998 - 2022 to find the champion (press -99 to stop):  2008

The Florida Gators were the National Champions in 2008.

Enter a year between 1998 - 2022 to 
find the champion (press -99 to stop): -1999

Invalid input, try again:   two thousand

Invalid input, try again:   tell me!!!!

Invalid input, try again:   2016

The Clemson Tigers were the National Champions in 2016.

Enter a year between 1998 - 2022 to 
find the champion (press -99 to stop):  -99


New Year, New Team, One Dream!



At a minimum, the class should have:

private member variables:
    an array that holds the year
    an array to hold the school and team name
    the input file

private member functions:
    file maintenance (opening the file, testing the file opened properly, reading the file, closing the file)
    display method

public member functions: 
    a constructor - if needed
    driver method

main() should only contain the instantiated object of the class, a call to the driver method, a system pause command, and a return statement.  Add comments.

NOTE:  Any submitted program that does not use OOP appropriately will result in a grade of 0.

To Do:

  1. Upload your cpp file to the Project 7 Drop Box.
  2. Be sure to check the Rubrics before you submit your Project. Rubrics tell you exactly what must be included in each Project and how much each item is worth.
  3. Check the Calendar for the due date!
  4. Be sure to use the template code (the file called template code under Visual Studio in Modules).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 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-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY