⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectcourse.java

📁 哈工大实验课源代码
💻 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 + -