Updated Professor.java for inheritance