Write an abstract class Employee (name, abstract double monthlyPay(), abstract String kind(), and a concrete toString() formatted %-10s %-10s %9.2f) and three concrete subclasses:
SalariedEmployee(name, annualSalary)— annual / 12;HourlyEmployee(name, rate, hours)— hours above 160 in the month are paid 1.5 × the rate;CommissionEmployee(name, base, sales, percent)— base + sales × percent / 100.
Payroll.main reads S name annual, H name rate hours or C name base sales percent until the end of input into an ArrayList<Employee>, prints each employee with one loop, then Total payroll: … and Highest paid: Omar (Hourly).
Why can you not write new Employee("x")?