There are two classes Emp and Employee. Emp is defi ned in the payroll department containing details of employee id and his/her payment. Employee is a Human resource department class containing only basic salary details and full personal details such as the name of the spouse, number of children, and the previous experience of the employee. Add code in the Emp class such that conversion from one type of employee object into another is possible. While converting, items that are not available in the source class (such as the number of children when the source class is Employee) should take a default value. What could be the problems with such conversions?
#Sales Offer!| Get upto 25% Off: