Can anybody run following code in java and send me the clear and complete output please

Can anybody run following code in java and send me the clear and complete output please.
 ATTACHMENT PREVIEW Download attachmentCOMP 274 Week 2Inheritance and PolymorphismThe objective of this programming assignment is to experience the use of inheritance in Java andto see how polymorphism works with inheritance in Java.The assignment involves writing three classes, plus a test class. The base class is an employeeclass which contains a couple of attributes common to all employees and a fundamental methodto calculate pay. The two derived classes are a commissioned employee that adds payment of asales commission as part of the pay calculation, and a union employee which adds overtimepayment and union dues as part of the pay calculation. The test program will be structured toinclude a method which accepts a base class reference and demonstrates polymorphic behavior.The details of the three classes to be implemented are as follows:1.An Employee contains a name, a department where the employee works, and an hourlyrate of pay. An explicit value constructor should be provided to set all three values whenan Employee object is created. There should be mutator methods to set the values of thedepartment and the pay rate. There should be one accessor method which returns a stringcontaining the name and the department in which the employee works. Finally, thereshould be a weekly pay method that takes an integer parameter for the number of hoursworked and returns the weekly pay. If the number of hours worked is less than 40 hours,the pay is the number of hours times the rate. If the number of hours worked is 40 ormore, the pay is 40 times the rate.2.The Union Employee inherits from the Employee class. A Union Employee contains adues variable which holds the amount of dues a Union Employee has withheld from theirpaycheck each week. An explicit value constructor should be provided to set all threevalues from the base class along with the dues value. There should be a mutator methodprovided to set the dues variable. The base class weekly pay method should be overriddenbecause a Union Employee gets 1.5 times the rate for any hours over 40 per week. Thismethod should use the base class method to calculate pay for first 40 hours and then addthe overtime amount. Also the weekly pay is reduced by the amount of dues withheld.3.The Commission Employee inherits from the Employee class. A Commission Employeecontains a commission rate and a sales amount variable which are used as part of the paycalculation. An explicit value constructor should be provided to set all 3 values of thebase class along with the commission rate variable. There should be mutator methods forthe commission rate and the sales amount. The base class weekly pay method should beoverridden because the Commission Employee gets the base employee pay plus thecommission rate times the sales amount. This method should use the base class weeklypay method to calculate the hourly part of the pay.
View the Answer4.The test program needs to create a Union Employee object and a Commission Employeeobject. The test program must contain a display method which takes a base classEmployee object reference along with the number of hours worked by the employee. Thedisplay method should use the base class method to get the employee name anddepartment info and output that information. The display method should also use the baseclass method to get the weekly pay info for the employee object and display thatinformation. The test program should pass the Union Employee object and theCommission Employee object to the display method along with the number of hours eachemployee has worked. It should test the payroll calculation for the number of hoursworked to be less than 40, 40, and greater than 40 hours for each employee type. Theoutput seen should demonstrate polymorphic behavior, that is the base class Employeereference to a Union Employee object elicits Union Employee pay calculations, and thebase class Employee reference to a Commission Employee elicits Commission Employeepayroll calculations.Take screen shots of the output of the program. Paste the screen shots and your source codefor all your classes into a Word document.publicclassEmployee {privateStringname;privateStringdepartment;privatedoublehourlyRate;publicEmployee(String p_name,String p_dept,doublep_hourlyRate){name= p_name;department= p_dept;hourlyRate= p_hourlyRate;}publicvoidsetDepartment(String p_dept){department= p_dept;}publicvoidsetHourlyRate(doublep_rate){hourlyRate= p_rate;}publicString getNameAndDepartment(){return”Name:”+name+”nDepartment:”+department;}publicdoubleWeeklyPay(intp_numberOfHoursWorked){
Show 
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"