I have a Contractor subclass that extends of it's parent class Staff.
Test Class
Date macHireDate = new Date(2016, 1, 5);
Staff mac = new Staff("Mac", 66222222, macHireDate);
System.out.println(mac);
Staff bob = new Contractor("Bob", new Date(2012,10,10), new Date(2013,4,11))
System.out.println(bob);
I want the output to be Bob (ID: None) ...
But I'm not sure how to make the ID a String. I don't want to change anything in my Test Class
public class Contractor extends Staff {
private Date contractEnds;
This is my Contractor classes constructor
public Contractor(String name, Date hireDate, long employementID, Date contractEnds) {
super(name, employementID, hireDate);
this.contractEnds = contractEnds;
}
and it's extending off of
public Staff(String name, long employementID, Date hireDate) {
super();
this.name = name;
this.hireDate = hireDate;
this.employementID = employementID;
}
Bob only has a String, Date, Date. So I'm having difficulties on how to make bobs ID "None" without changing anything in Test Class.