You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
824 B
20 lines
824 B
package com.ssm.aop.xml;
|
|
|
|
public class Course {
|
|
private String courseId;
|
|
private String courseName;
|
|
private int credit;
|
|
private Teacher teacher;
|
|
|
|
public void setCourseId(String courseId) { this.courseId = courseId; }
|
|
public void setCourseName(String courseName) { this.courseName = courseName; }
|
|
public void setCredit(int credit) { this.credit = credit; }
|
|
public void setTeacher(Teacher teacher) { this.teacher = teacher; }
|
|
|
|
public void printInfo() {
|
|
System.out.println("课程编号:" + courseId);
|
|
System.out.println("课程名称:" + courseName);
|
|
System.out.println("学分:" + credit);
|
|
System.out.println("授课教师信息:工号:" + teacher.getTeacherId() + ",姓名:" + teacher.getName() + ",职称:" + teacher.getTitle());
|
|
}
|
|
} |