public class returnDelimitedWebsite extends website {
public returnDelimitedWebsite(String n, String u, String d) {
super(n, u , d);
}
public String toString() {
return getName() + '\r' + getURL() +
'\r' + getDescription() + '\r';
}
public boolean over256() {
if (getDescription().length() > 256) return true;
return false;
}
}
The over256 method is simple. It gets the description String using getDescription and then tests the length of that String with the length method from java.lang.String. If the length is greater than 256 the method returns true. Otherwise it returns false. Nothing at all like this is present in the website class and nothing needs to be.