Question: We need C++ to solve this Based on Problem P11.4 Modify the merge sort algorithm to sort a vector of Employees by salary. The class

We need C++ to solve thisWe need C++ to solve this Based on Problem P11.4 Modify themerge sort algorithm to sort a vector of Employees by salary. The

Based on Problem P11.4 Modify the merge sort algorithm to sort a vector of Employees by salary. The class Employee in this problem is assumed to be class Employeet public: Employee (string e_name, double e_salary) : name (e_name), salary (e_salary) t ) string get_name () const f return name; ) double get_salary () const return salary; ) protected: string name; double salary; Write a program that reads the list of people's records from a file data2.txt, creates a corresponding vectorEmployee> and displays the name and salary for each employee After that the program should sort vector and display the name and the salary of employees in the sorted vector (for details see IO sample below) . You can assume that data for each employee is stored in data2.txt as name I salary one data record per line) and that the file has at least one line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!