Why did you change the visibility of getDegree in this case?