Package at.jku.ssw.fp.person
Class Student
- java.lang.Object
-
- at.jku.ssw.fp.person.Person
-
- at.jku.ssw.fp.person.Student
-
- All Implemented Interfaces:
Comparable<Person>
public class Student extends Person
Class for special person student. Students additionally do some study.- Author:
- Herbert Praehofer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Study
getStudy()
Returns the study of this student.void
setStudy(Study study)
Sets the study of this student.String
toString()
Returns a string representation of this student.
-
-
-
Field Detail
-
study
private Study study
The study of the student
-
-
Constructor Detail
-
Student
public Student(String name, int age, Study study)
Constructor initializing name, age and study.- Parameters:
name
- the name of the studentage
- the age of the professorstudy
- the study of the student
-
Student
public Student(String name, int age)
Constructor initializing name and age.- Parameters:
name
- the name of the studentage
- the age of the student
-
Student
public Student(String name)
Constructor initializing name.- Parameters:
name
- the name of the student
-
-