package employeeStuff;

public class SalariedEmployee extends PermanentEmployee {
	private double salary;

  	/**
	  * constructor from parameters
	 */
	public SalariedEmployee(String id,String first, String last, double salary) {
		super(id,first,last);
		this.salary = salary;
	}

	/**
	  *@return the salary
	  */
	public double getSalary() {
		return salary;
	}

	/**
	  * set the salary
	  */
	void setSalary(double s) {
		salary = s;
	}

	/**
	  *@return the pay check computation
	  */ 
	public double pay() {
		return (int)(salary/5200.0 * 100.0) - getBenefitDeduction();
	}

	/**
	  * overrides toString()
	  * @return SalariedEmployee data as a String
	 */
	public String toString() {
		return super.toString() + "Salaried Employee:\nSalary : " + salary + "  ";
	}

} // end SalariedEmployee

