Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

for the data listed in the c++ program below, it asks that the user must enter d

ID: 3637950 • Letter: F

Question

for the data listed in the c++ program below, it asks that the user must enter data for three employees and then display the information in output.
#include <iostream>
using namespace std;

class employee
{
private:
int id, maxHours;
float payRate;

public:
void setInfo (int pin, float pay, int hours)
{
empInfo[pin].id = pin;
empInfo[pin].payRate = pay;
empInfo[pin].maxHours = hours;
}

void viewInfo (int record)
{
cout << empInfo[record].id;
cout << endl << empInfo[record].payRate;
cout << endl << empInfo[record].maxHours;
}

};
int main ( )
{
int pin, hours, record;
float pay;

employee empInfo[1000];

cout << "Enter employee 3 digit ID: ";
cin >> pin;
cout << "Enter employee pay rate: ";
cin >> pay;
cout << "Enter employee max hours: ";
cin >> hours;

empInfo[pin].setData(pin, pay, hours);

cout << "Enter the employee ID# of the record you wish to view: ";
cin >> record;

empInfo.viewDate(record);

system("PAUSE");
return 0;
}

Explanation / Answer

#include #include using namespace std; class employee { private: int id, maxHours; float payRate; public: void setInfo (int pin, float pay, int hours) { empInfo[pin].id = pin; empInfo[pin].payRate = pay; empInfo[pin].maxHours = hours; } void viewInfo (int record) { cout