Design and implement a C++ Application that: Interactively input: Employee First
ID: 3762676 • Letter: D
Question
Design and implement a C++ Application that: Interactively input: Employee First Name Employee Last Name Employee id Employee hours worked per week Employee Pay Rate Menu with Option to: Print out Employee Report in the following report format Search for an Employee Display the Report in Sorted based on Last Name or ID Calculate the Pay Quit Criteria: Use Parallel Arrays to Store the Employee Information Use Input/Output Files Allow the user to search for a specific Employee Use this data for input: Brian Adams 612366 36 David Eisenhower 957654 38 Kathy Jones 123456 43 Janet Williams 245695 39 Steve Bradford 245690 39 MARKETING COMPANY REPORT PROGRAM FIRST NAME LAST NAME ID HOURS WORKED Hourly Rate Total Pay Brian Adams 612366 36 David Eisenhower 957654 38 Kathy Jones 123456 43 Janet Williams 245695 39 Steve Bradford 245690 39 Average Hours Worked: 39 Hrs/Week You are to convert the parallel arrays to data structures. Declare an array of structures. Add a field that keeps track of employee status (stat) Add two more choices to the menu: Print report for active employees Print a report of inactive employees. All reports should have complete information for the employee and all should include the header and title of the report, along with a title that explains what the report is. Use multiple source files for this program, and be sure your structure definition, prototypes and symbolic constants are defined in a header file, which should be included in your source files. Turn in the following reports: A report of all employees A report of all active employees A report of all inactive employees Two reports of specific employees One report that failed to find an employee Objective of this program: Using data structures Using pointers with structures Using headers Using Arrays of Structures Using multiple source files
Explanation / Answer
/A Employee detail program
//caculation of net salary and details
#include<iostream>
#include<conio.h>
using namespace std;
class Employee
{
int B_salary;
char name[20],address[30];
public:float Net_salary;
public:void getdata()
{
cout<>name;
cout<>address;
}
void getsalary()
{
cout<>B_salary;
}
public: float cal()
{
float da,hra,md;
da=(40*B_salary)/100;
hra=(10*B_salary)/100;
md=(5*B_salary)/100;
float Net_salary=B_salary+da+hra+md;
return Net_salary;
}
void display()
{
cout<<name<<“has the following address and salary ”;
cout<<address<<endl;
cout<<cal();
}
};
int main()
{
Employee compfu[100];
int n;
cout<>n;
for(int i=0;i<n;i++)
{
cout<<“Enter number”<<i<<“details: ”;
compfu[i].getdata();
compfu[i].getsalary();
}
for(int i=0;i10000)
compfu[i].display();
}
getch();
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.