/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/WageEmployee.java |
package com.calebfontenot.test;
import java.util.Date;
@author
public class WageEmployee extends Employee {
private double wage;
public WageEmployee(double wage, double hours)
{
this.wage = wage;
this.hours = hours;
}
public WageEmployee(double wage, double hours, String name, Date dateHired)
{
super(name, dateHired);
this.wage = wage;
this.hours = hours;
}
public double getWage() { return wage; }
public void setWage(double wage) { this.wage = wage; }
private double hours;
public double getHours() { return hours; }
public void setHours(double hours) { this.hours = hours; }
@Override
public double computePay() {
return this.wage * this.hours;
}
@Override
public String toString() {
return super.toString() + "WageEmployee{" + "wage=" + wage + ", hours=" + hours + '}';
}
}