COMP 220 Lab 3 Inheritance: Baseball Player and Pitcher Classes · Develop and apply an appropriate and useful inheritance hierarchy. · Use multiple cpp and header files effectively to develop modular code. Assume that all baseball players, regardless of their position, have these two important statistics: · rbi runs batted in, a whole number (so you must data type int) · batting average real number percentage of hits per at-bat (a real number, so you must use data type double) Pitchers are baseball players with an additional statistic, era (earned run average), a real number for earned runs per nine innings pitched (so you must use data type double). A logical class hierarchy for these two types of objects would use aPlayer class as a parent (base) class for a derived (child) Pitcherclass. The Pitcher class would include all the members of the Player class and have an additional (private) era data member, and, of course, appropriate (public) accessor, mutator and constructor methods. This relationship is sometimes called a , but is also called a , more particularly in this case, a . Note that the arrow points from derived (child) class to parent (base) class, which indicates the search path for executing member methods; if the method is not found in the Pitcher class, the compiler looks back to the parent class, Player, to find it. Each class (in this case Player and Pitcher) will have its own header (.h) and implementation (.cpp) file, and, of course, there needs to be an executable file that actually uses the class (an application .cpp file with a main function). As with the classes previously developed in the course, the application will be adriver program that executes each member function at least once with an arbitrary, but specifictest case data set. Use the given Player class as a base class for Pitcher and add to the BaseballPlayerDriver file code to test the class with the data specified below. Player class requirements: 1. Create with separate header (Player.h) and implementation (Player.cpp) files. 2. Two private data members, rbi and battingAverage. 3. A parameterized constructor that receives and sets the initial values for both rbi and battingAverage. 4. Two accessor (get) methods that return the values of the data members: getRbi and getBattingAverage. 5. Two mutator methods: 5.1. setRbi that receives a whole number and writes it to the rbi data member. 5.2. setBattingAverage that receives a real number and writes it to the battingAverage data member. 6. showAll accessor method that displays the values of both data members as shown here for an arbitrary test case for a player who has 10 rbi and batting average 0.1234: rbi = 10 batting average = 123 Note that the battingAverage variable will be a floating point number (double), but it must be rounded and display as a digit integer. Pitcher class requirements: 1. Pitcher class must be derived from Player class. 2. Create with separate header (Pitcher.h) and implementation (Pitcher.cpp) files. 3. One private data member, era. 4. A parameterized constructor that receives and sets the initial values for all three data members, rbi, battingAverage and era. 5. getEra accessor method that returns the value of era. 6. setEra mutator method that receives a real number and writes it to the era data member. 7. showAll function toover-ride the base classs showAll function and do the following: call the base classs showAll function to display the inherited data members values and, in addition, output the additional value, the pitchers era, as shown for an arbitrary test casefor a pitcher who has 10 rbi, batting average 0.1234 and era of 3.456: rbi = 10 batting average = 123 era = 3.46 Note that the era variable will be a floating point number (double), but it must be rounded and display to decimal places. BaseballPlayerDriver class requirements: 1. Tell the user youre creating a Pitcher with 10 rbi, batting average 0.1234 and era 3.456. 2. Use the parameterized constructor to create to instantiate a Pitcher variable, p1 with initial values 10 rbi, batting average 0.1234 and era 3.456. 3. Tell the user youre using the get methods to display the values of the data members. 4. Use cout and the three get methods to display the values. 5. Tell the user youre using the showAll method to display the values of the data members. 6. Call the showAll method. 7. Tell the user youre using setRbi to change it to 9. 8. Use setRbito change it to 9. 9. UseshowAllto display the data values. 10. Tell the user youre using setBattingAverage to change it to 0.2345. 11. Use setBattingAverage to change it to 0.2345. 12. Use showAll to display the data values. 13. Tell the user youre using setEra to change it to 5.678. 14. Use setEra to change it to 5.678. 15. Use showAll to display the data values. Additional Requirement: Use the modifier for member functions that do not write to a data member to guarantee the data members are protected. Put all five files (Player.h, Player.cpp, Pitcher.h, Pitcher.cpp andBaseballPlayerDriver.cpp ) in a folder called , zip it into a file named and submit it to the Week 3 Drop Box by the deadline.