package com.experiment; import cn.gdpu.roleExpansion; public abstract class Role implements roleExpansion{ private String name; private String id; private int health; public void setName(String name){ this.name = name; } public void setID(String id){ this.id = id; } public void setHealth(int health){ this.health = health; } public String getName(){ return this.name; } public String getID(){ return this.id; } public int getHealth(){ return this.health; } public Role(){ setName("人机"); setID("0000"); setHealth(1000); } public Role(String name, String id, int health){ setName(name); setID(id); setHealth(health); } public void move(){ System.out.println(""); } }