Question: Problem 1: Operator Overloading Write a class Employee having following attributes: 1. String name 2. Integer Age 3. Float Salary Over load the appropriate operators

 Problem 1: Operator Overloading Write a class Employee having following attributes:

Problem 1: Operator Overloading Write a class Employee having following attributes: 1. String name 2. Integer Age 3. Float Salary Over load the appropriate operators for the following functionality: 1. Input employee object 2. Output employee object 3. Convert the employee object to an integer (that integer should be the half of the employee's salary) Write another class Person having the following attributes: 1. String name 2. Integer Age Convert an object of type Employee to person. You can use assignment operator for this purpose

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!