Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using codeblocks 1. Company A employs two types of workers: full-time and part-time workers. These workers enjoy the following remuneration: Remuneration (RM) Category Fixed Salary

using codeblocks
image text in transcribed
image text in transcribed
1. Company A employs two types of workers: full-time and part-time workers. These workers enjoy the following remuneration: Remuneration (RM) Category Fixed Salary Hourly Salary Commission (% of total sales) Full-time 2000 15% Part-time 15 10% a) Create an abstract class Worker, which records the name, sales (the total sales of a particular month), commission and remuneration (the total remuneration). Create a pure virtual function called calculate() that calculates remuneration, a mutator function to set sales and a virtual function called print() that prints the name, sales and the remuneration. (3 marks) b) Create a class for each type of workers that are inherited from the abstract class Worker. Override the calculate() function according to the table above and the print() function to print the worker's category after the original print() function of Worker has been executed. (5 marks) c) Overload the + and

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions