public abstract class AbstractUser {
public abstract void See();
}
public class RegisteredUser extends AbstractUser {
public void See(){
System.out.println("注册用户");
}
public void Micronesia(){
System.out.println("修改自己信息");
};
public void Modifypost(){
System.out.println("修改自己帖子");
}
public class Tourist extends AbstractUser {
private AbstractUser abstractUser;
public void setAbstractUser(AbstractUser abstractUser) {
this.abstractUser = abstractUser;
}
@Override
public void See() {
System.out.println("我是游客");
abstractUser.See();
}
}