?? selectcourse.java
字號:
package mystudent;
public class SelectCourse {
private int studentId;//學號(studentId)課程名(courseName)所得分數(score)
private String courseName;
private double score;
public SelectCourse(int studentId, String courseName, int score) {//構造方法
this.studentId = studentId;
this.courseName = courseName;
this.score = score;
}
public String getCourseName() {//讀取課程名
return courseName;
}
public int getScore() {//讀取所得分數
return score;
}
public void setScore(int score) {//設置所得分數
this.score = score;
}
public int getStudentId() {//讀取學生學號
return studentId;
}
public void print()//輸出各個屬性的值
{
System.out.println("學號:" + getStudentId() + " 課程名:"
+ getCourseName() + " 成績:" + getScore());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -