Answered step by step
Verified Expert Solution
Question
1 Approved Answer
its a c++ problem thx 1) Create a class named Players with a default constructor, a public methods ReadFile, MaxSalary, and MaxSalaryName and a public
its a c++ problem thx
1) Create a class named Players with a default constructor, a public methods ReadFile, MaxSalary, and MaxSalaryName and a public data member salaries, which is an array with 50 floating point values and names which is an array of 50 strings. Use -1.0 to initialize all the salary values of the array and empty string for the name values initialization 2) The public method ReadFile will read each line from the given filename and store each value into the arrays. Each line of the file contains a name and salary separated by a comma. This method does not return a value. 3) The public method MaxSalary returns the maximum salary in the data. 4) The public method MaxSalaryName returns the name associated with maximum salary in the data You only need to write the class definition and any code that is required for that class. Place all code within the class definition. Our code will create and test your class NOTE: We have provided a function that may make the parsing easier: int split(string s, char sep, string words[], int max_ words)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started