Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Use this class to store two double type values that could be used to compute the area of figures. Derive two specific classes called employee, manager and worker from the base class. Make calculateSalary () as a virtual function and redefine this function in the derived classes to suite their requirements. Using these four classes, design a program that will accept basic and calculate the salary.
Employee: DA: 8% of basic HRA: 6%of basic Salary of an employee= (basic+ DA+HRA) Manager: DA: 12% of basic HRA: 10%of basic Salary of a manager= (basic+ DA+HRA) Worker: DA: 12% of basic HRA: 10%of basic Salary of a worker= (basic+ DA+HRA)
Q-2 . Overload / (division) operator to divide two complex numbers. Use friend function to overload operator.
Formula: