Tag Archives: arraylist assignments

Student Class

This class will be used in our Class Roster assignment .

Here is a client  test file . This tester file should not be   in the same class/file as Student . Instead. just put the tester into BlueJ into class called StudentRunner , within  the same BlueJ project,  and run the client file.

Instance variables

  • private String name
  • private int age
  • private int socialSecurityNum  (  How can we guarantee unique social security  numbers? )

Constructors

  • default
    • public Student()   .
  • public Student( String _name)
  • public Student (String _name,  int _age)

Accessors

  • public int getSSN()
  • public int getAge()
  • public String getName()
  • public boolean equals(Student other)
  • public String toString()

Mutators

  • public void setAge( int  _age)
  • public void setName( String to)