请设计一个学生类Student。属性包括:学号、姓名、英语成绩、数学成绩

2025-03-01 07:20:44
推荐回答(3个)
回答1:

ublic class Student { // 学号 private String studentNo; // 姓名 private String name; // 英语成绩 private Double enlishScore; // 数学成绩 private Double mathScore; // 计算机 private Computer computer; public String getStudentNo() { return studentNo; } public void setStudentNo(String studentNo) { this.studentNo = studentNo; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Double getEnlishScore() { return enlishScore; } public void setEnlishScore(Double enlishScore) { this.enlishScore = enlishScore; } public Double getMathScore() { return mathScore; } public void setMathScore(Double mathScore) { this.mathScore = mathScore; } public Computer getComputer() { return computer; } public void setComputer(Computer computer) { this.computer = computer; }} /** * 计算机类 * * @author Administrator * */class Computer { // 计算机名 private String name; // 系统版本号 private String sysInfo; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSysInfo() { return sysInfo; } public void setSysInfo(String sysInfo) { this.sysInfo = sysInfo; } }

回答2:


都不给分的   这么麻烦谁给你写

回答3:

怎么了。正常编辑就可以啊