Question: Write a C++ program that asks the user to enter data for 10 employees. The following information should be entered by the user: name, scale

Write a C++ program that asks the user to enter data for 10 employees. The following information should be entered by the user: name, scale (1 to 17), gross salary for the last 3 years, and address. The program should calculate the yearly tax (5% of gross salary for scale 1 to 10 employees and 7.5% for scale 11 to 17) and net_salary (gross_salary tax_due). For an employee, the structure variable should be allocated dynamically on heap memory using new operator. A pointer emp_ptr (of employee type) should be used to point to the first employee (initially emp_ptr will be NULL). The second employee should be referred by the first employee (Employee* next structure member). This will result in a chain of records in the heap (linked with each other using next pointer) as shown below. Next, find the average net_salary for all the 10 employees. Also, display the name and address of the employee who has paid the highest tax (for any year). using structures

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!