Class Student

java.lang.Object
  extended by Person
      extended by Student

public class Student
extends Person

Class that represents a student. A student is a person and has a unique id

Author:
Mark Guzdial, Barb Ericson

Constructor Summary
Student()
          Constructor that takes no arguments
Student(String name)
          Constructor that takes the student's name
 
Method Summary
 int getId()
          Method to get the id
 void greet()
          Method to greet someone
 void setId(int theId)
          Method to set the identifier
 
Methods inherited from class Person
getName, main, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Student

public Student()
Constructor that takes no arguments


Student

public Student(String name)
Constructor that takes the student's name

Parameters:
name - the name for this student
Method Detail

getId

public int getId()
Method to get the id

Returns:
the identifier

setId

public void setId(int theId)
Method to set the identifier

Parameters:
theId - the identifier to use

greet

public void greet()
Method to greet someone

Overrides:
greet in class Person