Hi,
I would appreciate help in resolving this issue.
My specification for Class Employee states:
Employee()
//post variables set to non-null values;
Employee (String nme, char sex, Date dob, int id, Date start)
//pre start !=null
//post variables initialised with params passed in
Class Employee extends class Person.
This is what i have done for the constructors which I have taken the details from the specification for.
public class Employee extends Person { //instance variables protected int id; protected Date start; protected float salary; //start constructors public Employee() { super(); id=0; salary=0; [COLOR="Red"]start=[/COLOR] } public Employee(String nme, char sex, Date dob, int number, Date start) { super (nme, sex, dob); id=number; start= new Date(start); salary=0; } //end of constructors
the problem i have is with setting the date (the section highlighted in red) to a non-null value. How do i do this? I have looked over my previous work and found nothing where we have set the initial state for a date.
Your help will be greatly appreciated.
Many Thanks