SalariedEmployee

SalariedEmployee - { setWholeName(newName);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * The SalariedEmployee class <Subclass * of Employee class> * @author Jeff Cox */ * public class SalariedEmployee extends Employee { double annualPay; public SalariedEmployee() { annualPay = 0; } public SalariedEmployee(double newPay) { annualPay = newPay; } public SalariedEmployee(String newName, String newAdd) { annualPay = 0; setWholeName(newName); setAddress(newAdd); } public SalariedEmployee(String newName, String newAdd, double newPay)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { setWholeName(newName); setAddress(newAdd); annualPay = newPay; } public double getAnnualPay() { return annualPay; } public void setAnnualPay(float Ap) { annualPay = Ap; } public String toString() { String Output; Output = &quot;Name: &quot; + getWholeName() + &quot;\nAddress: &quot; + getAddress() + &quot;\nAnnual Pay: &quot; + annualPay; return Output; } }...
View Full Document

Ask a homework question - tutors are online