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

📄 course.java~4~

📁 学生成绩管理系统
💻 JAVA~4~
字号:
package teamwork;

/**
 * <p>Title: teamwork</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author yeliang
 * @version 1.0
 */
public class course {

    String[] sub = new String[10];
    int[] sub_mark = new int[10];
    int num;//某一学期课程数量

    public course() {
        num = 0;
        for(int i=0;i<10;i++) sub[i] = null;
        for(int i=0;i<10;i++) sub_mark[i] = 0;
    }

    public void delete(String coursename){
        int i = 0;
        int n = 0;

        for(i=0;i<num;i++)
            if(this.sub[i].equals(coursename))
                for(int j=i;j<num;j++){
                    this.sub[j] = this.sub[j+1];
                    this.sub_mark[j] = this.sub_mark[j+1];
                    n++;
                    //this.num = this.num - 1;
                }

        this.num = this.num - n;
    }

    public void add(String coursename,int mark){
        this.sub[num] = coursename;
        this.sub_mark[num] = mark;
        this.num = this.num + 1;
    }

    public static void main(String[] args) {
        //course course = new course();
    }
}

⌨️ 快捷键说明

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