Who could help me with exceptions, I have a task to make a small simulation of student app for university. So I have a log in page and in that page I have labels and text fields for name
, surname
, adress
, city
and student index book. I have to make a several classes for exception and main class will be studentexceptions
and other will be subclasses in which I will have nameException
, surnameException
, adressException
, cityException
and indexBookException
. What should I put in studentException
? Maybe to make it abstract?
public class cityIsNotValidException extends StudentException {
private String city;
public cityIsNotValidException(String city){
super("Name of the city is not valid "+city);
this.city=city;
}
public String getCity(){
return city;
}
}