Student.setFullName = ("Kevin Smith");
That statement assigns a String (to right of =) to the static variable: setFullName in the Student class.
Yeah that makes sense, but i cannot get it to work with the set/get methods.
currently it works like this:
Name = JOptionPane.showInputDialog("Enter First and Last Name:");
StudentID = JOptionPane.showInputDialog("Enter StudentID");
Address = JOptionPane.showInputDialog("Enter Adress");
Student person = new Student(Name, StudentID, Address);
StArray[index] = person;
But instead of creating a new "person" with (Name, StudentID, Address) can i somehow use my set/get methods in my student class to assign the values to the setName, setStudentID, setAddress?
and then instead of displaying the results like this in my Student.class:
public String display()
{
return Name + "\n" + StudentID +
"\n" + Address + ".";
}
public String toString() {
return ""+display()+"";
}
Display it like
public String display()
{
return getName + "\n" + getStudentID +
"\n" + getAddress + ".";
}
because at the moment my code does not use the set/get methods at all. Still works the same even if i delete them out of my code