I have no idea in doing the following:
Create new salary object based on the gross salary
Store new salary object in array
Check if the new gross salary is the new minimum and update accordingly
Check if the new gross salary is the new maximum and update accordingly
Please see the attachemnts for details.© BrainMass Inc. brainmass.com March 4, 2021, 6:03 pm ad1c9bdddf
when you create Salary class, try to create a struct in the header file which contains all information. for example,
you can have it outside class declaration almost like global.
Then in payroll class where you invoke the main function, the C++ code may be like the following
// Main( ) provides the entry point for the program. It does not
// accept any command-line arguments nor does it return a value to
// the calling program.
void Main( )
cout << " Welcome to the Salary calculator program " << endl << endl;
float min =100000000.0;
float max =-1000000.0;
float grossSalary = ...
The new salary object based on the gross salary is created. The new minimum and updated accordingly is found.