C++ program that maintains a collection of employees. e data that is associated with an Employee class: etween 25-50) pe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ program that maintains a collection of employees. e data that is associated with an Employee class: etween 25-50) pe

Post by answerhappygod »

C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 1
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 1 (136.73 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 2
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 2 (127.49 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 3
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 3 (109.04 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 4
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 4 (93.82 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 5
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 5 (104.58 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 6
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 6 (115.88 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 7
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 7 (127.37 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 8
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 8 (112.09 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 9
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 9 (107.83 KiB) Viewed 29 times
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 10
C Program That Maintains A Collection Of Employees E Data That Is Associated With An Employee Class Etween 25 50 Pe 10 (116.66 KiB) Viewed 29 times
write a C++ code
C++ program that maintains a collection of employees. e data that is associated with an Employee class: etween 25-50) per_month eductions salary_with_deductions functions that can be performed on Employee object: Constructor: (constructor without arguments). This should set 0 initially for the data members Emp_ID, Age, Salary_per_month, Total_deductions and Annual_salary_with_deductions for the created without passing any values. ctor: (constructor with arguments). This should set the values for the data members Emp_ID, Age and Salary_per_month as per user's choice for the object created by using three values. But, el_deductions and Annual_salary_with_deductions data members alone should be set to O initially in this three parametrized constructor. While setting value to the member data "Age" validation De performed to check whether the given age is between 25 and 50 only. If so, user input can be set as value to "Age". Otherwise, print "Invalid" and exit the program. Salary: This function should compute annual salary of the employee based on the "this" pointer after the following deductions from the annual salary. ion details:-

Deduction details:- Income tax: 10% from the annual salary. Educational chess: 5% from the annual salary. Professional tax: 3% from the annual salary. Then set Total_deductions (sum of income tax, educational chess and professional tax) and Annual_salary_with_deductions (Salary_per_month * 12 - Total_deductions) of the employee by using "this" pointer and print the annual salary with the complete deduction details of the employees. Compare_emp: This function should compare two employees' annual salaries after all deductions and find which employee is paid high. This function should carry two objects as arguments and after comparison, it should return an object from the function to the main function which is having the highly paid employee details. Print_emp: This function should displays all data members of the object passed as the argument to it. Note:- Write a main function that tests Employee class as follows: Create two objects of type Employee using argument constructor to initialize it member data as per user's choice to Emp_ID, Age and Salary_per_month. But Total_deductions and Annual_salary should be set to O initially. Compute the annual salary for these employee objects and print the same with complete deduction details.

Compare both the employees to find the highly paid employee. Display the details of the highly paid employee. You may decide the type of the member data as per the requirements. Output is case sensitive. Therefore, it should be produced as per the sample test case representations. Age should be between 25 and 50 only. Otherwise, print "Invalid". In samples test cases in order to understand the inputs and outputs better the comments are given inside a particular notation (.....). When you are inputting get only appropriate values to the corresponding attributes and ignore the comments (.......) section. In the similar way, while printing output please print the appropriate values of the corresponding attributes and ignore the comments (.......) section. Sample Test cases:- case=one input=123 (Emp_ID) 21 (Age)

Sample Test cases:- case=one input=123 (Emp_ID) 21 (Age) 50000 (Salary) 124 (Emp_ID) 23 (Age) 60000 (Salary) output=Employee 1 Income tax=5000 Educational chess=2500 Professional tax=1500 Total deductions=9000 Annual salary without deductions=600000 Annual salary with deductions=591000 Employee 2 Income tax=6000

Employee 2 Income tax=6000 Educational chess=3000 Professional tax=1800 Total deductions=10800 Annual salary without deductions=720000 Annual salary with deductions=709200 Highly paid is Employee 2 Emp_ID=124 Age=23 Salary per month=60000 Total deductions=10800 Annual salary with deductions=709200 grade reduction=15% case=two input=123 (Emp_ID)

case=two input=123 (Emp_ID) 21 (Age) 50000 (Salary) 124 (Emp_ID) 53 (Age) 60000 (Salary) output=Invalid grade reduction=15% case=three input=123 (Emp_ID) 51 (Age) 50000 (Salary) 124 (Emp_ID) 23 (Age) 60000 (Salary)

124 (Emp_ID) 23 (Age) 60000 (Salary) output= Invalid grade reduction=15% case=four input=100 (Emp_ID) 21 (Age) 80000 (Salary) 124 (Emp_ID) 23 (Age) 70000 (Salary) output= Employee 1 Income tax=8000 Educational chess=4000 Professional tax=2400

case-four input=100 (Emp_ID) 21 (Age) 80000 (Salary) 124 (Emp_ID) 23 (Age) 70000 (Salary) output= Employee 1 Income tax=8000 Educational chess=4000 Professional tax=2400 Total deductions=14400 Annual salary without deductions=960000 Annual salary with deductions=945600 Employee 2 Income tax=7000 Educational chess=3500

case=four input=100 (Emp_ID) 21 (Age) 80000 (Salary) 124 (Emp_ID) 23 (Age) 70000 (Salary) output= Employee 1 Income tax=8000 Educational chess=4000 Professional tax=2400 Total deductions=14400 Annual salary without deductions=960000 Annual salary with deductions=945600 Employee 2 Income tax=7000 Educational chess-3500

Annual salary with deductions=945600 Employee 2 Income tax=7000 Educational chess=3500 Professional tax=2100 Total deductions=12600 Annual salary without deductions=840000 Annual salary with deductions=827400 Highly paid is Employee 1 Emp_ID=100 Age=21 Salary per month=80000 Total deductions=14400 Annual salary with deductions=945600 grade reduction=15%
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply