course.java

来自「java应用程序 这个是自己第一次写的东西 还是初学」· Java 代码 · 共 33 行

JAVA
33
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */import javax.swing.*;public class Course {    //课程名、编号、学分、学时初始化    public Course(String cna,int cn,float cre,int time){        cname = cna;        cnum = cn;        credit = cre;        period = time;    }    public void addCourse(String cname,int cnum,int period,float credit){        //courList.add(new Course(cna,cn,cre,time));         //stuList.add(new Student(gd,mj,cl,id,nam));    }    public String toString(){        String s = cname+"   "+cnum+"   "+credit+"   "+period;        return s;    }    public float score;//学生成绩    public String cname;//课程名字    public int period ;//学时    public  float  credit;//学分    public  int cnum;    //课程编号      }

⌨️ 快捷键说明

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