/** * A student is a person with an ID. IDs are not guaranteed to be unique in any * sense. * * @mathmodel n : String
* id : Integer * @constraint n =/= ""
* id >= 0
* id never changes * @initially Student() ensures n = "Baby Doe" and id = 0
* Student(String name, int identity) ensures n = name and id = identity */ public interface Student extends Person { /** * Returns the result of a ticket lottery. Each call to this method is a new * run of the lottery and so is not guaranteed to return the same result as * before. There is no guarantee of fairness in the lottery. * * @return result of a lottery for tickets. */ boolean winsTicketLottery(); /** * Displays identifying information of this student. * * @return a String containing identifying information related to the name * and id of the student */ String showInfo(); }