//PROTOYPE
void Display();
//CALL
list.Display();
/***********************************
* Print the contents of the list *
***********************************/
void EmployeeList::Display()
{
// Temporary pointer
newEmployee * tmp;
tmp = head;
// No employees in the list
if(tmp == NULL )
{
cout << "tt***THERE IS NO EMPLOYEE INFORMATION STORED YET***n";
retu;
}
cout << ""
<< "tt************************************************n"
<< "tt* Employee IDs and Yearly Salary DataBase *n"
<< "tt************************************************";
cout << "tttEmployee IDs" << setw(20) << right << "Yearly Salariesn";
// One employee in the list
if(tmp->Next() == NULL )
{
cout << "ttt " << tmp->empID() << setw(13) << right << " "
<< "$" << setw(2) << tmp->ySalary() << endl;
}
else
{
do
{
cout << "ttt " << tmp->empID() << setw(13) << " "
<< right << "$" << setw(2) << tmp->ySalary() << endl;
tmp = tmp->Next();
}while(tmp != NULL );
cout << "nttt ***Thank You***" << endl;
}
}
I NEED HELP ON WHAT TO WRITE IN ORDER TO DO A RECURSIVE function call FOR Display function. I need to display the list in reverse order from last to first. HOW CAN I DO A RECURSIVE PRINT USING CLASS LINKED LIST
