Homework Output Help

Hello, can someone help me. Everything works but the employee name output doesn't display as it should. What am I doing wrong?

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

const double federal_withholding_rate = 0.16, state_deduction_rate = 0.065;
int ID;
double hourly_rate,grosspay, federal_withholding,state_deduction, netpay,hours_worked;
string employee;

void getData()
{
cout << "Please enter the employee's 4-digit ID # and press <Enter>" << endl;
cin >> ID;
while (ID<5000||ID>9999)
{
cout << "ERROR: INVALID ID"<<endl;
cin >> ID;
}
cout << "Please enter the employee’s name: "<<endl;
getline(cin,employee);
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cout << "Please enter the amount of hours worked this week and press <Enter>"<<endl;
cin >> hours_worked;
while (hours_worked<0||hours_worked>120)
{
cout << "ERROR: INVALID AMOUNT OF HOURS WORKED!"<<endl;
cout << "Please enter the amount of hours worked this week and press <Enter>"<<endl;
cin >> hours_worked;
}
cout<< "Please enter the hourly pay rate for this employee and press <Enter>"<<endl;
cin >> hourly_rate;
while (hourly_rate<0)
{
cout << "ERROR: INVALID Pay Rate!"<<endl;
cout<< "Please enter the hourly pay rate for this employee and press <Enter>"<<endl;
cin >> hourly_rate;
}
}

void computeGrossPay(){
if (hours_worked>40)
{
double overtime = 1.5;
double overtime_hours = hours_worked-40;
grosspay = 40*hourly_rate+(overtime*overtime_hours*hourly_rate);}
else
{grosspay = hourly_rate*hours_worked;}
}

void computeDeductions(){
state_deduction = grosspay*state_deduction_rate;
federal_withholding = grosspay * federal_withholding_rate;
}

void computeNetPay(){
netpay = grosspay-(state_deduction+federal_withholding);
}

void displayResults(){
cout<< "Employee:"<<setw(15)<<" "<<ID<<endl;
cout<<fixed<<setprecision(2);
cout<< "Employee Name:"<<setw(11)<<" "<< employee <<endl;
cout<< "Hours Worked:"<<setw(11)<<" "<<hours_worked<< " hours"<<endl;
cout<< "Hourly Rate:" <<setw(13)<<"$"<< hourly_rate<< endl;
cout<< "Gross Pay:"<<setw(15)<<"$"<<grosspay<< endl<<endl;
cout << "Federal Withholding:"<<setw(5)<<"$"<< federal_withholding<<endl;
cout << "State Withholding:"<<setw(7)<<"$"<<state_deduction<<endl<<endl;
cout << "NET PAY:"<<setw(17)<<"$"<<netpay<<endl<<endl;

}

int main()
{
char answer;
while (true) {
getData();
computeGrossPay();
computeDeductions();
computeNetPay();
displayResults();

cout << "Would you like to calculate the net pay of another employee? Y or N ";
cin >> answer;

cin.ignore(numeric_limits<streamsize>::max(), '\n');

if ((answer == 'N') || (answer == 'n')) {
break;}
}
}
...the employee name output doesn't display as it should.

How should the output display?
It should just display
Topic archived. No new replies allowed.