Done in C++ and all in one .cpp file the following.
1) Create a new project which consists of one class; the RacingData class.
The class should have data members that are used to represent the name of the player, the score achieved and the time (in both minutes and seconds) taken to achieve this score. The functions in the class should perform the following
• set the name, score and time
• return this same data
• print this data
Also add a default constructor and a constructor with parameters.
Operator Overloading: The class should have an additional function that overloads the + operator such that when used to add two objects it will add the scores of each object as well as the time to achieve these scores. It will not check that the names are the same. The result of adding two RacingData objects together should be another RacingData object with combined data. Write the complete implementation for this function.
2) Construct a main method so that it can test the class. This is to be done by creating six objects that are to represent two players each playing three games. Use the following data to construct the six objects:
Name: Score: Minutes: Seconds:
Danica Patrick 185 11 20
Danica Patrick 103 11 30
Danica Patrick 73 12 40
Jeff Gordon 155 10 10
Jeff Gordon 127 11 15
Jeff Gordon 34 12 35
USING THE OVERLOADED + OPERATOR, find the average score and time for each player and print out which performer had to lowest total time and which performer had the highest total score.