Student Class

This class will be used in our Class Roster assignment .

Here is a  test filefor the Student Class.

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)

One thought on “Student Class

  1. Pingback: SUPA AP A [2020-21] - Mr. M online

Comments are closed.