courseinfo.java
来自「北大青鸟一道java机试题 北大青鸟一道java机试题」· Java 代码 · 共 55 行
JAVA
55 行
package lk;/** * <p>Title: </p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2008</p> * * <p>Company: </p> * * @author not attributable * @version 1.0 */public class CourseInfo { public String id; public String courseName; public int theoryhours; public int operatehours; public int onlinehours; public int guidancehours; /** * 重写tostring方法 * @return String */ public String toString() { return courseName; } /** * 只需要名字的构造方法 * @param courseName String */ public CourseInfo(String courseName) { this.courseName = courseName; } /** * 重写构造方法 * @param courseName String * @param theoryhours int * @param operatehours int * @param onlinehours int * @param guidancehours int */ public CourseInfo(String courseName, int theoryhours, int operatehours, int onlinehours, int guidancehours) { this.courseName = courseName; this.theoryhours = theoryhours; this.operatehours = operatehours; this.onlinehours = onlinehours; this.guidancehours = guidancehours; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?