I'm working with a class and getting a call to this class with it as input.
professor = new Professor(EEEE, AAAA, YEARS_90, DEP);
depProf.addProfessor(professor)
Professor has a constructor of (String, String, Integer, String), but in a test I want to call it from another place with (Professor) as input.
public Professor(String name, String surname, Integer yearOfBirth, String department) {
this.department = department;
Person curPerson = new Person(name, surname, yearOfBirth);
}
How can I make a constructor of Professor(Professor)? If that make any sense.
I'm thinking about calling 1st constructor when second is called but don't actually know how to make it work.