How I should make something like that in Java?
Right now I've this:
public class Person {
String name;
String surName;
Integer yearOfBirth;
//Constructors, Getters, Setters and Methods
}
public class Professor extends Person {
String department;
//Constructors, Getters, Setters and Methods
}
// Two Childs of Professor
public class DepartmentProfessor {
String departmentName;
//Constructors, Getters, Setters and Methods
}
I'm very newbie to UML, if I understood correctly, Professor has to be an interface and DepartmentProfessors have to implement it but then I've the problem of Person being superclass, have concrete methods, of Professor and it having two subclasses.
