Create a project named Program_2_File_Clerk Use the material in Chapter 2 to create a program that in a single main function: Processes data from an input file. The first line of the input file should contain exactly one character. The character should be printable, but not alphanumeric. This character will be used in your program as a separator. Each line separator should be 60 characters long The input file should contain five entries containing. First Name and Last Name, separated by white space. Job Title, all on one line. 4 salary entries in ascending order Accepts the full path to a file on the computer as input. Use a separator before printing the next section For each entry: Print the person\'s last name and first name, Print the current salary to 2 decimal places Print the average raise received to 2 decimal places, Print the average rate of salary increase as a percentage to 4 decimal places. Print another separator, then: Print the average (current) salary for all of the people in the input file. Print the average rate of salary increase for all Notes The sample only has 2 entries; the submitted program should work with 5 entries. Therefore, the input file must have 5 entries. The produced output must look exactly like my output, as this exercise is about formatting. The rubric for this assignment follows: Program fulfills all tasks listed in assignment description: 70% Program is organized in a logical fashion (uses functions, etc.): 15% Program conforms to style guidelines (meaningful identifiers, comments, etc.). 15% No credit will be received for assignments not placed in the appropriate share drive folder.
//program for reading data files
#include <istream.h>
class employees
{
protected:
double sal[4];
double avgsalinc;
double avgsalincper;
char fname[10];
char lname[10];
char JobTitle[5];
// double basic;
public:
void showdata(void)
{
cout<<endl<<\"empname \"<<fname<<lname;
cout<<endl<<\"designation \"<<JobTitle;
cout.setf(ios::fixed);
cout << setprecision (2);
cout<<endl<<\"current sal \"<<sal[4];
double sum=0.0;
double avg=0.0;
for(i=1;i<=4;i++)
{
sum=sum+sal[i];
}
avg=sum/4;
avgsalinc=avg*0.04;
cout<<\"average sal increase=\"<<avgsalinc;
cout.setf(ios::fixed);
cout << setprecision (4);
avgsalincper=(avgsalinc/avg)*100;
cout<<\"average rate of salary increase\"<<avgsalincper;
cout<<\"-------------------------------------------------------------------\";
}
void main(void){
employees empl;
ifstream infile(\"f3.fil\");
infile.read((char*)&empl, sizeof(empl));
empl.showdata( );
}
}