import java.util.*;
import java.lang.*;
public class Student
{
private String firstName;
private String lastName;
private int studentNumber;
public Boolean isEmptyOrWhitespace(String input)
{
return input == null
|| input.isEmpty()
|| input.trim().isEmpty();
}
public Student(String firstName, String lastName, int studentNumber)
{
if (isEmptyOrWhitespace(firstName)) throw new IllegalArgumentException("firstName is invalid");
if (isEmptyOrWhitespace(firstName)) throw new IllegalArgumentException("lastName is invalid");
if (studentNumber < 0) throw new IllegalArgumentException("studentNumber must be a positive integer");
this.firstName = firstName;
this.lastName = lastName;
this.studentNumber = studentNumber;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public boolean hasStudentNumber(int number) {
return this.studentNumber == number;
}
@Override
public String toString() {
return firstName + " " + lastName + ", s" + studentNumber;
}
}