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

📄 course.java

📁 Refer to the UML diagram above and implement the Course class. After you define the Course class, yo
💻 JAVA
字号:
/*
 * Course.java
 *
 * Created on October 1, 2007, 3:04 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package javaapplication5;

/**
 *
 * @author WEK070010
 */

public class Course {
    
    /** Creates a new instance of Course */
    public Course() {
    }
    
    private String title;
    private String code;
    private String lecturer;
    
    public Course(String title,String code,String lecturer){
        this.title = title;
        this.code = code;
        this.lecturer = lecturer;    
        }
        
        
        public String getTitle(){ 
            return title;
        }
        public String getCode(){
            return code;
        }
        public String getLecturer(){
            return lecturer;
        }
        public void setTitle(String title){
            this.title =title;
        }
        public void setCode(String code){
            this.code = code;
        }
        public void setLecturer(String lecturer){
            this.lecturer = lecturer;
        }
         public String toString(){
            String output = getTitle() + "," + getCode() + "," + "taught by " + getLecturer();
            return output;        
        }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -