2025-10-10 16:11:08 -07:00

55 lines
1.1 KiB
Java

/**
* Assignment 23
* Skill: CISS238
* Student: Scott Steely
* Date: Oct 08, 2025
*/
package dropbox23;
import java.time.LocalDate;
public abstract class Employee {
//fields
private String name;
private LocalDate hire_date;
//accessors
public String getName() {
return name;
}
public LocalDate getHire_Date() {
return hire_date;
}
//mutator
public void setName(String name) {
this.name = name;
}
public void setHire_Date(LocalDate hire_date) {
this.hire_date = hire_date;
}
//Constructor
protected Employee() {
}
protected Employee(String name, LocalDate hire_date) {
this.name = name;
this.hire_date = hire_date;
}
//method
public abstract boolean meets_minimum_wage();
public abstract double weekly_pay();
//toString
@Override
public String toString() {
String str;
str = String.format("Employee name: %s%n%s%n%s%n",
getName(), getHire_Date(), meets_minimum_wage()?
"Minimum wage meet.": "Minimum wage not meet.");
return str;
}
}