Package at.jku.ssw.fp.person
Class Professor
- java.lang.Object
-
- at.jku.ssw.fp.person.Person
-
- at.jku.ssw.fp.person.Professor
-
- All Implemented Interfaces:
Comparable<Person>
public class Professor extends Person
Class for special person professor. Professors additionally do some research.- Author:
- Herbert Praehofer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getResearch()
Returns the research of this professor.void
setResearch(String research)
Sets the research of this professor.String
toString()
Returns a string representation of this professor.
-
-
-
Field Detail
-
research
private String research
The research of the professor
-
-
Constructor Detail
-
Professor
public Professor(String name, int age, String research)
Constructor initializing name, age and research.- Parameters:
name
- the name of the professorage
- the age of the professorresearch
- the research of the professor
-
Professor
public Professor(String name, int age)
Constructor initializing name and age.- Parameters:
name
- the name of the professorage
- the age of the professor
-
Professor
public Professor(String name)
Constructor initializing name.- Parameters:
name
- the name of the professor
-
-