数据表与简单Java类(角色与权限)进行单独类的描述代码是什么?
Class Dept { // 部门信息
private int did ;
private String dname ;
public Dept(int did,String dname) {
this.did = did ;
this.dname = dname ;
}
public String getInfo() {
return”【部门】did = “+this.did+”,名称=“+this.dname ;
}
}
class Emp { // 雇员信息
private int eid ;
private String ename ;
public Emp(int eid,String ename) {
This.eid = eid ;
This.ename = ename ;
}
public String getInfo() {
return “【雇员】eid = “+ this.eid + “、ename=”+this.ename ;
}
}
class Role { //角色信息
private int rid ;
private String title ;
public Role (int rid,String title) {
this.rid = rid ;
this.title = title ;
}
public Sting getInfo() {
return”【角色】rid = “+this.rid +”、title = “ +this.title ;
}
}
class Action { //权限,privilege
private int aid ;
private String title ;
private String flag ;
public Action (int aid,String title,String flag) {
this.aid = aid;
this.title = title ;
this.flag = flag ;
}
Public String getInfo() {
Return”【权限】aid = “ + this.aid +”、title =”this.title + “+this.flag ;
}
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。