Answer to Question #212861 in C++ for kaushal

Question #212861

Write a C++ program for implementing the following


a. Create a class called Employee with Employee name, Designation and Basic Pay as data members.



b.    Inherit a class called Allowance from Employee with HRA and DA as data members



c.     Inherit a class called Deductions from Employee with PF and Income Tax as data members



d.    Inherit class Salary from Allowance and Deductions which has Net pay as its data member.


Create an array of employees, calculate net pay for each employee and sort them (using operator overloading).


1
Expert's answer
2021-07-03T04:46:16-0400
#include<iostream>
using namespace std;
class Employee{
	private:
		string name;
		string designation;
		int basic_pay;
	pu
};
class Allowance: public Employee{
	private:
		double hra;
		double da;
};
class Deductions: public Allowance{
	private:
		double net_pay;
};
int main(){
	
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS