A subclass must also observe the first and second rules. It inherits its identifier property from the superclass, Student.
For example:
package r4r;
public class DomesticStudent extends Student
{
private String name;
public String getName() {
return name;
}
protected void setName(String name) {
this.name=name;
}
}