Class Professor

  • All Implemented Interfaces:
    Comparable<Person>

    public class Professor
    extends Person
    Class for special person professor. Professors additionally do some research.
    Author:
    Herbert Praehofer
    • 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 professor
        age - the age of the professor
        research - the research of the professor
      • Professor

        public Professor​(String name,
                         int age)
        Constructor initializing name and age.
        Parameters:
        name - the name of the professor
        age - the age of the professor
      • Professor

        public Professor​(String name)
        Constructor initializing name.
        Parameters:
        name - the name of the professor
    • Method Detail

      • getResearch

        public String getResearch()
        Returns the research of this professor.
        Returns:
        the research
      • setResearch

        public void setResearch​(String research)
        Sets the research of this professor.
        Parameters:
        research - the new research
      • toString

        public String toString()
        Returns a string representation of this professor.
        Overrides:
        toString in class Person
        Returns:
        the string representation