Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

solve this in c++ with complete detail and comments. Wo. 2 Write a program with three different classes, 'Person', 'SalariedEmployee' and Commission Employee 'Person' should

image text in transcribed

solve this in c++ with complete detail and comments.

Wo. 2 Write a program with three different classes, 'Person', 'SalariedEmployee' and Commission Employee 'Person' should be base class and "Salaried Employee' as well as 'CommissionEmployee' must be directly derived from it. 'Person has a member function 'Calculate Salary, which in return calls function "Salary which exists in all the classes. Make sure that objects of all classes call their own function of salary Calculate salary for "Salaried Employee' by taking number of months as input and multiply it with their salary which has already been set using appropriate "SetSalary function. Calculate salary for 'Commission Employee' by taking number of hours as input and multiply it with their hourly rate which has already been set using appropriate "SetSalary function. (15 Marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students explore these related Databases questions

Question

write a code to draw this picture in OpenG1

Answered: 3 weeks ago

Question

Compare the current team to the ideal team.

Answered: 3 weeks ago