/** * A person has a name, which is not necessarily unique. * * @mathmodel n : String * @constraint n =/= "" * @initially Person() ensures n = "Baby Doe"
* Person(String name) ensures n = name */ public interface Person { /** * Changes the name of this person. * * @requires name =/= "" * @param name * the new name of the person * @ensures n = name */ void rename(String name); /** * Displays identifying information of this person. * * @return a String containing identifying information related to the name * of the person */ String getName(); /** * Displays identifying information of this person. * * @return a String containing identifying information related to the name * of the person */ String showInfo(); }