// NAME: Liane Nakamura // STUDENT ID: 25806927 // Salary Employee subclass of Employee public class EmployeeSalary extends Employee { String name; int salary; public EmployeeSalary (String name) { super(name); } public EmployeeSalary (String name, int salary) { super(name); this.salary = salary; } public String getName() { return super.getName(); } public Paycheck createWeeklyPaycheck(int hoursWorked) { double taxRate = .2; Paycheck check; int grossPay = salary / 52; int tax = (int) (grossPay * taxRate); check = new Paycheck(this, hoursWorked, grossPay, tax); return check; } public String toString() { String s = getName(); s += " (salary, " + CurrencyFormat.format(salary) + "/year)"; return s; } }