subject

Complete the following classes based on the instructions to achieve polymorphism for this exercise. Employee class (employee. h/.cpp) Employee class is an abstract class. You will need to add a string getTaxes(); function as a pure virtual function. Additionally, you may need to make some function in Employee virtual (check derived classes SalaryEmployee and Hourly Employee to see what functions have been overwritten or need to be virtual to achieve the correct behavior). 5 point will be deducted for every function that does NOT need to be virtual if it is virtual in the submission. SalaryEmployee class (salaryEmployee. h/.cpp) Salary Employee is a derived class of Employee. Please declare the following functions in the Salary Employee class (salary Employee. h) and provide their respective implementation (in salaryEmployee. cpp), respectively. • string getTaxes(): This function returns as a double the taxes that the employee has to pay, equal to 25% of the year salary. • string getEmployeelnfo(): This function returns the following string: , SSN: <33n>, year salary: SalaryEmployee destructor. This destructor will output a message Salary data destroyed. HourlyEmployee class (hourlyEmployee. h/.cpp) HourlyEmployee is a derived class of Employee. Please declare the following functions in the HourlyEmployee class (hourlyEmployee. h) and provide their respective implementation (in Hourly Employee. cpp), respectively. • string getTaxes(); This function returns as a double the taxes that the employee has to pay. For an hourly employee, this number is Oif they worked less than 100 hours, and 30% of the income (as wage* hours) otherwise. • string getEmployeelnfo(): This function returns the following string: , SSN: , salary (this month): • HourlyEmployee destructor. This destructor will output a message Hourly data destroyed. taxCollector function (main. cpp) the taxCollector function has to be implemented in the main file, and allows to compute the taxes to be paid by a group (array) of employees of various type. The function takes as input an array of pointers of type Employee and the size of the array. It then iterates through the array to compute and add together the taxes paid by each employee, and returns this number. Hint: since you are working with an array of pointers, consider what would be the best operator to access the getTaxes function (or ->). The main is commented in the initial template to allow you to test the classes first (Test cases 1-6). After passing these test cases, uncomment the main. Uncommenting the main while your classes are still incomplete may lead to compiler errors.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 22.06.2019 02:30
Write a program that takes in 3 inputs [players (int type), expected game time (double type), team (char type)] and calculates actual game time (double) based on the following conditions: if the number of players or the expected game time is less than or equal to zero, it should output wrong input if the number of players is greater than 0 and less than or equal to 6 and if they are on the â€r’ or â€r’ team, their game time will be 10% faster. and if they are on the â€b’ or â€b’ team, their game time will be 15% faster. and if they are on the â€y’ or â€y’ team, their game time will be 20% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 6 but less than or equal to 12 and if they are on the â€r’ or â€r’ team, their game time will be 20% faster. and if they are on the â€b’ or â€b’ team, their game time will be 25% faster. and if they are on the â€y’ or â€y’ team their game time will be 30% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 12 but less than or equal to 18 and if they are on the â€r’ or â€r’ team, their game time will be 30% faster. and if they are on the â€b’ or â€b’ team, their game time will be 35% faster. and if they are on the â€y’ or â€y’ team, their game time will
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
You know the right answer?
Complete the following classes based on the instructions to achieve polymorphism for this exercise....
Questions
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Chemistry, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Physics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Biology, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
English, 13.09.2020 02:01
question
Spanish, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
question
Mathematics, 13.09.2020 02:01
Questions on the website: 13722361