import java.util.Scanner; public class SalariedEmployee extends Employee { private double salary; public SalariedEmployee(double aSalary) { super(); salary = aSalary; } // Non-absract class so this method must have a body public double calculateEarnings() { double netEarings; Scanner in; double taxRate; double netEarnings; in = new Scanner(System.in); System.out.print("Current tax rate: "); taxRate = in.nextDouble(); netEarnings = salary - (salary * taxRate); return(netEarnings); } public String toString() { String allFields; allFields = super.toString(); allFields = allFields + "\t" + "Salary: " + salary + "\n"; allFields = allFields + "\t" + "Earnings: " + calculateEarnings(); allFields = allFields + "--------------------" + "\n"; return(allFields); } }