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;
}
}