为您推荐:
精华内容
最热下载
问答
  • 5星
    6.59MB helongqiang 2021-06-23 22:24:41
  • 5星
    46.38MB weixin_40228600 2021-03-26 09:10:00
  • 630KB qq_36573702 2017-09-27 10:55:26
  • 825KB qq_26975307 2019-12-29 21:55:52
  • 125B weixin_39840924 2019-07-22 14:30:50
  • 6.07MB u011291472 2020-12-25 07:01:26
  • 239KB fan__meng 2019-06-23 13:36:33
  • 31.77MB qq_36784544 2019-05-22 21:35:03
  • 398KB qq_43812731 2021-08-05 14:40:15
  • 1.33MB z767215122 2018-04-13 14:16:51
  • 18 学生选课系统 假定有n门课程,每门课程有课程编号,课程名称,课程性质,学时,授课学时,实验或上机学时,学分,开课学期等信息,学生可按要求(如总学分不得少于15)自由选课。试设计一个选修课程系统,使之能...

    今年夏季小学期的作业,一个星期设计出一个图书馆里系统

    写的时候东拼西凑才完成,debug无数次,写的时候脑子还是有点不太清楚,今天不小心又打开了这个项目,于是乎想整理一下

    题目

    18 学生选课系统
    假定有n门课程,每门课程有课程编号,课程名称,课程性质,学时,授课学时,实验或上机学时,学分,开课学期等信息,学生可按要求(如总学分不得少于15)自由选课。试设计一个选修课程系统,使之能提供以下功能:
    (1)系统以菜单方式工作
    (2)课程信息和学生选课信息录入功能(课程信息用文件保存)
    (3)课程信息浏览功能
    (4)查询功能
    (5)按学分查询
    (6)某门课程学生选修情况(可选项)

    数据库+IDEA+SenceBuilder

    先上效果

    登录页面:
    登录页面
    学生操作页面:
    首页
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述

    管理员页面
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    设计

    结构
    在这里插入图片描述
    实体层(entity):
    学生类(student.java)
    管理员类(Adm.java)
    课程类(curriculum.java)

    控制层(controller):
    LoginAction.java
    AdmAction.java
    StudentAction.java

    视图层(view):
    login.fxml
    student.fxml
    adm.fxml

    数据库设计

    数据库名:course_selection_system
    adm

    在这里插入图片描述
    curriculum
    在这里插入图片描述
    student
    在这里插入图片描述
    student_course表:根据学生id和课程id的一对多关系,查找该学生id下对应的所有课程id,进而再根据课程id找到唯一的课程
    在这里插入图片描述

    关系图:
    在这里插入图片描述
    三个实体类设计:
    在这里插入图片描述

    代码

    数据库连接类

    package cn.edu.ncu.yang.db;
    
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    
    public class DBUtil {
    
        private static final String URL="jdbc:mysql://localhost:3306/course_selection_system?useUnicode=true&serverTimeZone=UTC";
        private static final String NAME="yjz";//我的数据库用户名
        private static final String PASSWORD="yjz123456";//数据库密码
    
    
        private static Connection conn=null;
        //静态代码块(将加载驱动、连接数据库放入静态块中)
        static{
            try {
                //1.加载驱动程序
                Class.forName("com.mysql.cj.jdbc.Driver");
                //2.获得数据库的连接
                conn = DriverManager.getConnection(URL, NAME, PASSWORD);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        //对外提供一个方法来获取数据库连接
        public static Connection getConnection(){
            return conn;
        }
    }
    

    管理员类

    package cn.edu.ncu.yang.entity;
    
    import cn.edu.ncu.yang.db.DBUtil;
    
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.List;
    
    
    /**
     * Adm管理员,
     * 功能:查询课程,添加课程,删除课程
     */
    public class Adm {
        //连接数据库
        private static Connection con= DBUtil.getConnection();
        //管理员id
        private String id;
        //管理员密码
        private String password;
        //创建一个课程类,方便后面操作
        private List<Curriculum> courses=new ArrayList<>();
    
        public Adm(String id, String password) {
            this.id = id;
            this.password = password;
        }
    
    
        /**
         * 注册
         * @param id   账号
         * @param password 密码
         * @return
         */
        public static Adm Register(String id,String password){
    
            try {
                String sql2="insert into adm(id,password) values('"+id+"','"+password+"')";
                PreparedStatement psmt=DBUtil.getConnection().prepareCall(sql2);
                psmt.executeUpdate();
             } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return new Adm(id,password);
        }
    
    
        /**
         * 登录
         * @param id 账号
         * @param password 密码
         * @return
         */
        public static Adm Login(String id,String password){
            String sql="select * from student where student_id ='"+id+"'"+"and student_password='"+password+"'";
    
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(sql);
                if (!rs.next()) {
                    return Register(id,password);
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return new Adm(id,password);
        }
    
    
    
        /**
         * 得到所有课程信息
         * @return
         */
        public  List<Curriculum> getCourses(){
            try{
                Statement statement = con.createStatement(); //2.创建statement类对象,用来执行SQL语句!!
                String sql = "SELECT * FROM curriculum ";//要执行的SQL语句
                ResultSet rs = statement.executeQuery(String.format(sql));
                while (rs.next()) {
                    courses.add(Curriculum.getACurriculum(rs));
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return courses;
    
        }
    
        /**
         * 添加课程
         * @param course
         */
        public void addCourse(Curriculum course){
            try {
                String sql2="insert into curriculum(course_id,teacher_name,course_name,class_hours,course_nature,opening_semester,student_number) values('"
                        +course.getId()+
                        "','"+course.getTeacherName()+
                        "','"+course.getName()+
                        "','"+course.getClassHours()+
                        "','"+course.getNature()+
                        "','"+course.getOpeningSemester()+
                        "','"+course.getStudentNumber()+"')";
                PreparedStatement psmt=DBUtil.getConnection().prepareCall(sql2);
                psmt.executeUpdate();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
        }
    
        /**
         * 删除课程
         * @param courseId
         */
        public boolean delCourse(String courseId){
    
            try{
                var sql = "delete from curriculum where course_id=’%s‘";
                PreparedStatement psmt = con.prepareStatement(String.format(sql, courseId));
                //执行SQL语句
                psmt.executeUpdate(String.format(sql, courseId));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
                return false;
            }
            return true;
        }
    
    
    
        public void setCourses(java.util.List<Curriculum> courses) {
            this.courses = courses;
        }
    
        public String getId() {
            return id;
        }
    
        public void setId(String id) {
            this.id = id;
        }
    
        public String getPassword() {
            return password;
        }
    
        public void setPassword(String password) {
            this.password = password;
        }
    }
    

    学生类

    package cn.edu.ncu.yang.entity;
    
    import cn.edu.ncu.yang.db.DBUtil;
    
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.List;
    
    /**
     * 学生类
     * 学号:id
     * 登录密码:password
     * 姓名:name
     * 班级:grade
     * 课程数:courseNumber
     * 总学分:totalCredit
     *
     *功能:添加课程,查询课程,删除课程,查看(修改个人信息)
     *
     *
     *
     */
    
    public class Student {
    
        private static Connection con=DBUtil.getConnection();
        private String id;
        private String password;
        private String name;
        private String grade;
        private int courseNumber;
        private double totalCredit;
        private List<Curriculum> curriculumList;
    
    
        public Student() {
    
        }
    
        public Student(String id,String password){
            this.id=id;
            this.password=password;
        }
    
        public Student(String id, String password, String name, String grade, int courseNumber, double totalCredit) {
            this.id = id;
            this.password = password;
            this.name = name;
            this.grade = grade;
            this.courseNumber = courseNumber;
            this.totalCredit = totalCredit;
        }
    
        /**
         * 登录
         * @param id
         * @param password
         * @return
         */
        public static Student Login(String id,String password) {
            String sql="select * from student where student_id ='"+id+"'"+"and student_password='"+password+"'";
    
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(sql);
                if (rs.next()) {
                    return getAStudent(rs);
                }
    
                else{
                    return Register(id,password);
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
        }
    
    
        /**
         * 注册
         * @param id
         * @param password
         * @return
         */
        public static Student Register(String id,String password){
            String sql="select * from student where student_id ='"+id+"'"+"and student_password='"+password+"'";
    
            try {
                String sql2="insert into student(student_id,student_password) values('"+id+"','"+password+"')";
                PreparedStatement psmt=DBUtil.getConnection().prepareCall(sql2);
                psmt.executeUpdate();
    
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return Login(id,password);
    
        }
    
    
        /**
         * 判断课程是否已选
         * @param course
         * @return
         */
        public Boolean isCourseSelected(Curriculum course){
            String sql="select * from student_course where student_id =%s and course_id=%s";
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(String.format(sql,getId(),course.getId()));
                if (rs.next()) {
                    System.out.println(course.getName()+":该课程已经被选");
                    return true;
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return false;
    
        }
    
        /**
         * 判断课程人数是否已满
         * @param course
         * @return
         */
        public boolean isFullPerson(Curriculum course){
            String sql="select * from curriculum where course_id='"+course.getId()+"'";
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(sql);
                if (rs.next()) {
                    System.out.println("学生人数:"+Curriculum.getACurriculum(rs).getStudentNumber());//debug
                    return Curriculum.getACurriculum(rs).getStudentNumber()>=30;
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return false;
        }
    
        /**
         * 判断课程是否存在
         * @param course
         * @return
         */
        public boolean isCourseExistence(Curriculum course){
            String sql="select * from curriculum where course_id=%s";
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(String.format(sql,course.getId()));
                if (rs.next()) {
                    System.out.println("course"+course.getName()+"存在");//debug
                    return true;
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return false;
        }
    
    
        /**
         * 添加课程
         * @param course
         * @return
         */
        public boolean addCourse(Curriculum course){
            if(!isCourseSelected(course)&&!isFullPerson(course)&&isCourseExistence(course)) {
                addTotalCredit(course);
                addCourseNumber(course);
                addStudentToCourseId(getId(), course.getId());
                return true;
            }
            return false;
        }
    
        /**
         * 删除课程
         * @param course
         * @return
         */
        public boolean delCourse(Curriculum course){
            if(isCourseSelected(course)){
                delCourseNumber(course);
                delTotalCredit(course);
                delStudentToCourseId(getId(),course.getId());
                return true;
            }
            return false;
        }
    
    
        /**
         * 学生增加课程时,添加对应的student_course
         * @param studentID
         * @param courseID
         */
        public void addStudentToCourseId(String studentID,String courseID){
           try{
                String sql = "insert into student_course(student_id,course_id) values(%s,%s)";
               System.out.println("插入学生id:"+studentID);
               PreparedStatement psmt = con.prepareStatement(String.format(sql, studentID, courseID));
               //执行SQL语句
               psmt.executeUpdate(String.format(sql, studentID, courseID));
            } catch (SQLException throwables) {
               throwables.printStackTrace();
           }
        }
    
    
        /**
         * 学生删除课程时
         * 删掉对应的student_course表中的信息
         * @param studentID
         * @param courseID
         */
        public void delStudentToCourseId(String studentID,String courseID){
    //        try{
    //            String sql = "insert into student_course(student_id,course_id) values(" + studentID + "," + courseID + ")";
    //            PreparedStatement psmt = DBUtil.getConnection().prepareCall(sql);
    //            psmt.execute();
    //        } catch (SQLException throwables) {
    //            throwables.printStackTrace();
    //        }
    
            try{
                var sql = "delete from student_course where student_id=%s and course_id=%s";
                PreparedStatement psmt = con.prepareStatement(String.format(sql, studentID, courseID));
                //执行SQL语句
                psmt.executeUpdate(String.format(sql, studentID, courseID));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
        }
    
    
        /**
         * 添加课程时,对应的课程数加一
         * @param course
         */
        public void addCourseNumber(Curriculum course){
    
            try{
                Statement statement = con.createStatement(); //2.创建statement类对象,用来执行SQL语句!!
                String sql1 = "UPDATE curriculum SET student_number='" + (course.getStudentNumber()+ 1)+
                "' WHERE course_id='" + course.getId() + "'";//要执行的SQL语句
                statement.executeUpdate(String.format(sql1));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
    
        /**
         * 学生删除课程时,课程人数减一
         * @param course
         */
        public void delCourseNumber(Curriculum course){
    
            try{
                Statement statement = con.createStatement(); //2.创建statement类对象,用来执行SQL语句!!
                String sql1 = "UPDATE curriculum SET student_number='" + (course.getStudentNumber()-1)+
                        "' WHERE course_id='" + course.getId() + "'";//要执行的SQL语句
                statement.executeUpdate(String.format(sql1));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
    
        /**
         * 添加课程时增加相应的学分
         * @param course
         */
        public void addTotalCredit(Curriculum course){
            try{
                Statement statement = con.createStatement();
                String sql = "update student set total_credit='" + (getTotalCredit() + course.getCredit()) + "' where student_id='" + getId() + "'";
                statement.executeUpdate(String.format(sql));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
        }
    
        /**
         * 删除课程时减去相应的学分
         * @param course
         */
        public void delTotalCredit(Curriculum course){
            try{
                Statement statement = con.createStatement();
                String sql = "update student set total_credit='" + (getTotalCredit() - course.getCredit()) + "' where student_id='" + getId() + "'";
                statement.executeUpdate(String.format(sql));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
        }
    
    
        /**
         * 得到自己的所有的课程信息
         * @return
         */
        public List<Curriculum> getAllMyCourse(){
            List<Curriculum> courses= new ArrayList<>();
    //        String sql="select course_id from student_course where student_id='"+getId()+"'";
    //        String sql2="SELECT * from curriculum as c " +
    //                "RIGHT JOIN student_course as s " +
    //                "ON "+"c.student_id="+getId()+ "and c.course_id=s.course_id";
            String sql1="SELECT * from curriculum as c inner JOIN student_course as s ON s.student_id="+getId()+"  and s.course_id=c.course_id";
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(String.format(sql1));
                while (rs.next()) {
                    courses.add(Curriculum.getACurriculum(rs));
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
            return courses;
    
        }
    
    
    
        /**
         * 得到一个学生的全部信息
         * @param rs
         * @return
         */
        public static Student getAStudent(ResultSet rs)  {
            Student student=new Student();
    
            try{
                student.setId(rs.getString("student_id"));
                student.setName(rs.getString("student_name"));
                student.setPassword(rs.getString("student_password"));
                student.setGrade(rs.getString("student_grade"));
                student.setCourseNumber(rs.getInt("course_number"));
                student.setTotalCredit(rs.getDouble("total_credit"));
    
            }catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
            return student;
        }
    
    
        public String getId() {
            return id;
        }
    
        public void setId(String id) {
            this.id = id;
        }
    
        public String getPassword() {
            return password;
        }
    
        public void setPassword(String password) {
            this.password = password;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getGrade() {
            return grade;
        }
    
        public void setGrade(String grade) {
            this.grade = grade;
        }
    
        public int getCourseNumber() {
            return courseNumber;
        }
    
        public void setCourseNumber(int courseNumber) {
            this.courseNumber = courseNumber;
        }
    
        public double getTotalCredit() {
            return totalCredit;
        }
    
        public void setTotalCredit(double totalCredit) {
            this.totalCredit = totalCredit;
        }
    
        @Override
        public String toString() {
            return "Student{" +
                    "id='" + id + '\'' +
                    ", password='" + password + '\'' +
                    ", name='" + name + '\'' +
                    ", grade='" + grade + '\'' +
                    ", courseNumber=" + courseNumber +
                    ", totalCredit=" + totalCredit +
                    ", curriculumList=" + curriculumList +
                    '}';
        }
    }
    
    

    Curriculum

    package cn.edu.ncu.yang.entity;
    
    import cn.edu.ncu.yang.db.DBUtil;
    
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.*;
    
    /**
     * 要求:
     * 课程类:
     * 假定有n门课程,每门课程有
     * 课程编号 id
     * 课程名称,name
     * 课程性质,必修/选修  obligatory/optional
     * 学时,授课学时,实验或上机学时, teaching_hours/experimental_hours
     * 学分,credit
     * 开课学期  opening_semester
     * 等信息
     */
    
    public class Curriculum {
        //创建数据库连接
        private static Connection con=DBUtil.getConnection();
        //课程id
        private String id;
        //课程名
        private String name;
        //课程性质
        private String nature;
        //学时
        private int classHours;
        //学分
        private double credit;
        //开课学期
        private String openingSemester;
        //学生人数
        private int studentNumber;
        //任课老师
        private String teacherName;
    
    
        public Curriculum() {
    
        }
    
        public Curriculum(String id) {
            this.id = id;
        }
    
        public Curriculum(String id, String name, String nature, int classHours, double credit, String openingSemester, String teacherName) {
            this.id = id;
            this.name = name;
            this.nature = nature;
            this.classHours = classHours;
            this.credit = credit;
            this.openingSemester = openingSemester;
            this.studentNumber=0;
            this.teacherName=teacherName;
        }
    
    
        /**
         * 查找课程
         * @param info
         * @return
         */
        public static  Curriculum findCourse(String info){
          Curriculum course= new Curriculum();
            course=findCourseByID(info);
            if(course==null){
               course=findCourseByTeacherName(info);
               if(course==null){
                   course=findCourseByCourseName(info);
                   if(course==null){
                       course=findCourseByCourseCredit(info);
                       if(course==null){
                           course=findCourseByCourseNature(info);
                       }
                   }
               }
            }
    
    
            return course;
        }
    
        /**
         * 查找符合信息的所有课程
         * @param info
         * @return
         */
        public static List<Curriculum> findCourses(String info){
            List<Curriculum> courses=new ArrayList<>();
            if((findCourseByID(info))!=null)courses.add(findCourseByID(info));
            if(findCourseByCourseName(info)!=null)courses.add(findCourseByCourseName(info));
            if(findCourseByTeacherName(info)!=null)courses.add(findCourseByTeacherName(info));
            if(findCourseByCourseCredit(info)!=null)courses.add(findCourseByCourseCredit(info));
            if(findCourseByCourseNature(info)!=null)courses.add(findCourseByCourseNature(info));
            return courses;
        }
    
        /**
         * 查找课程通过课程编号
         * @param id
         * @return
         */
        public static Curriculum findCourseByID(String id){
    
            String sql="select * from curriculum where course_id='"+id+"'";//课程id
            try {
                Statement stmt= con.createStatement();
    
                ResultSet rsId=stmt.executeQuery(String.format(sql));
                if(rsId.next()) {
                    System.out.println("找到了课程:"+id);
                    return getACurriculum(rsId);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
    
        }
    
        /**
         * 根据courseName查找课程
         * @param courseName
         * @return
         */
        public static Curriculum findCourseByCourseName(String courseName) {
            String sqlID = "select * from curriculum where course_name='" + courseName + "'";//课程id
            try {
                Statement stmt = con.createStatement();
    
                ResultSet rs = stmt.executeQuery(String.format(sqlID));
                if (rs.next()) {
                    System.out.println("找到了课程:"+courseName);
                    return getACurriculum(rs);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
        }
    
        /**
         * 根据teacherName查找
         * @param teacherName
         * @return
         */
        public static Curriculum findCourseByTeacherName(String teacherName) {
            String sql="select * from curriculum where teacher_name='"+teacherName+"'";//授课老师
            try {
                Statement stmt = con.createStatement();
    
                ResultSet rs = stmt.executeQuery(String.format(sql));
                if (rs.next()) {
                    return getACurriculum(rs);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
        }
    
        public static Curriculum findCourseByCourseCredit(String courseCredit) {
            String sql="select * from curriculum where course_credit='"+courseCredit+"'";//课程学分
            try {
                Statement stmt = con.createStatement();
    
                ResultSet rs = stmt.executeQuery(String.format(sql));
                if (rs.next()) {
                    return getACurriculum(rs);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
        }
    
    
    
        public static Curriculum findCourseByCourseNature(String courseNature) {
            String sql="select * from curriculum where course_nature='"+courseNature+"'";//课程性质
            try {
                Statement stmt = con.createStatement();
    
                ResultSet rs = stmt.executeQuery(String.format(sql));
                if (rs.next()) {
                    System.out.println("找到了课程:"+courseNature);
                    return getACurriculum(rs);
                }
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            return null;
        }
    
    
        /**
         * 查找所有课程
         * @return
         */
        public  static List<Curriculum> getAllCourse(){
            List<Curriculum> courses = new ArrayList<>();
    
            String sql="select * from curriculum";
            try {
                Statement statement = con.createStatement();
                ResultSet rs = statement.executeQuery(String.format(sql));
                System.out.println("okgetAllCourse");
                System.out.println(courses==null);
    //            System.out.println(rs.next());
                while (rs.next()) {
    
                    //用来测试是否执行到这里了
                    System.out.println((courses.add(Curriculum.getACurriculum(rs))));
    //                System.out.println("ok2");
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
    
            System.out.println(courses.isEmpty());
            return courses;
    
        }
    
    
    
    
    
        //根据找到的ResultSet封装成课程
        public static Curriculum getACurriculum(ResultSet rs)  {
            Curriculum course= new Curriculum();
    
            try{
                course.setId(rs.getString("course_id"));
                course.setName(rs.getString("course_name"));
                course.setNature(rs.getString("course_nature"));
                course.setClassHours(rs.getInt("class_hours"));
                course.setCredit(rs.getDouble("course_credit"));
                course.setTeacherName(rs.getString("teacher_name"));
                course.setOpeningSemester(rs.getString("opening_semester"));
                course.setStudentNumber(rs.getInt("student_number"));
    
                System.out.println("ok");
    
                }catch (SQLException throwables) {
                throwables.printStackTrace();
            }
            System.out.println(course.toString());
            return course;
        }
    
        public String getId() {
            return id;
        }
    
        public void setId(String id) {
            this.id = id;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getNature() {
            return nature;
        }
    
        public void setNature(String nature) {
            this.nature = nature;
        }
    
        public int getClassHours() {
            return classHours;
        }
    
        public void setClassHours(int classHours) {
            this.classHours = classHours;
        }
    
        public double getCredit() {
            return credit;
        }
    
        public void setCredit(double credit) {
            this.credit = credit;
        }
    
        public String getOpeningSemester() {
            return openingSemester;
        }
    
        public void setOpeningSemester(String openingSemester) {
            this.openingSemester = openingSemester;
        }
    
    
    
        public int getStudentNumber() {
            return studentNumber;
        }
    
        public void setStudentNumber(int studentNUmber) {
            this.studentNumber = studentNUmber;
        }
    
        public String getTeacherName() {
            return teacherName;
        }
    
        public void setTeacherName(String teacherName) {
            this.teacherName = teacherName;
        }
    
        @Override
        public String toString() {
            return "Curriculum{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", nature='" + nature + '\'' +
                    ", classHours=" + classHours +
                    ", credit=" + credit +
                    ", openingSemester='" + openingSemester + '\'' +
                    ", studentNumber=" + studentNumber +
                    ", teacherName='" + teacherName + '\'' +
                    '}';
        }
    
        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Curriculum that = (Curriculum) o;
            return id.equals(that.id);
        }
    
        @Override
        public int hashCode() {
            return Objects.hash(id);
        }
    }
    

    AdmAction

    package cn.edu.ncu.yang.controller;
    
    import cn.edu.ncu.yang.db.DBUtil;
    import cn.edu.ncu.yang.entity.Adm;
    import cn.edu.ncu.yang.entity.Curriculum;
    import cn.edu.ncu.yang.entity.Student;
    import cn.edu.ncu.yang.view.LoginAction;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.fxml.FXML;
    import javafx.scene.control.Alert;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.TextField;
    import javafx.scene.control.cell.PropertyValueFactory;
    
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.List;
    
    public class AdmAction {
        @FXML
        private TableView tableView;
        @FXML
        private TableColumn courseId;
        @FXML
        private TableColumn courseTeacher;
        @FXML
        private TableColumn courseCredit;
        @FXML
        private TableColumn classNumber;
        @FXML
        private TableColumn classHours;
        @FXML
        private TableColumn openingTerm;
        @FXML
        private TableColumn courseName;
        @FXML
        private TableColumn courseNature;
    
        @FXML
        private TextField idTxt;
        @FXML
        private TextField hoursTxt;
        @FXML
        private TextField teacherTxt;
        @FXML
        private TextField creditTxt;
        @FXML
        private TextField termTxt;
        @FXML
        private TextField natureTxt;
        @FXML
        private  TextField nameTxt;
    
        @FXML
        private TextField delTxt;
    
        private Adm adm ;
    
    
    
        public void initialAdm(){
            adm=LoginAction.adm;
        }
    
        /**
         * 显示所有课程
         */
        @FXML
        public void showAllCourse(){
            ObservableList<Curriculum> list = FXCollections.observableArrayList();
            List<Curriculum> allCourses=Curriculum.getAllCourse();
            showCourses(list, allCourses);
        }
    
        public void showCourses(ObservableList<Curriculum> list, List<Curriculum> courses){
            //每次显示清空一次列表
            list.clear();
            for (Curriculum course : courses) {
    
                list.add(course);  //list添加值对象
            }
            courseId.setCellValueFactory(new PropertyValueFactory("id"));
            courseTeacher.setCellValueFactory(new PropertyValueFactory("teacherName"));
            classHours.setCellValueFactory(new PropertyValueFactory("classHours"));
            courseNature.setCellValueFactory(new PropertyValueFactory("nature"));
            courseCredit.setCellValueFactory(new PropertyValueFactory("credit"));
            openingTerm.setCellValueFactory(new PropertyValueFactory("openingSemester"));
            classNumber.setCellValueFactory(new PropertyValueFactory("studentNumber"));
            courseName.setCellValueFactory(new PropertyValueFactory("name"));
    
            tableView.setItems(list);
        }
    
    
        /**
         * 添加课程
         */
        @FXML
        public void addCourse(){
            initialAdm();
            String id=idTxt.getText();
            String hours=hoursTxt.getText();
            String teacher = teacherTxt.getText();
            String credit = creditTxt.getText();
            String term = termTxt.getText();
            String nature = natureTxt.getText();
            String name=nameTxt.getText();
            System.out.println(Integer.parseInt(hours));
            adm.addCourse(new Curriculum(id,name,nature,Integer.parseInt(hours),Double.parseDouble(credit),term,teacher));
    
            showMessage("添加课程成功");
        }
    
        /**
         * 删除课程
         */
        @FXML
        public void delCourse(){
            initialAdm();
            String id=delTxt.getText();
    //        Curriculum course=Curriculum.findCourse(String.format(id));
    //        System.out.println(course==null);
            if(!adm.delCourse(id)){
                showMessage("删除失败");
            }
    
            showMessage("删除成功");
        }
    
        public void showMessage(String info){
            Alert alert= new Alert(Alert.AlertType.INFORMATION);
            alert.setContentText(info);
            alert.showAndWait();
        }
    }
    

    ==StudentAction ==

    package cn.edu.ncu.yang.controller;
    
    import cn.edu.ncu.yang.db.DBUtil;
    import cn.edu.ncu.yang.entity.Curriculum;
    import cn.edu.ncu.yang.entity.Student;
    import cn.edu.ncu.yang.view.LoginAction;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.fxml.FXML;
    import javafx.scene.control.*;
    import javafx.scene.control.cell.PropertyValueFactory;
    
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    
    /**\
     * 查看所有课程
     * 查看我的课程
     * 查询课程
     * 添加课程
     * 删除课程
     * 查看我的信息
     */
    public class StudentAction {
        @FXML
        private TextField infoTxt;
        private Button button1;
        private Button button2;
    
        @FXML
        private TableColumn<Curriculum,String> course_id;
        @FXML
        private TableColumn<Curriculum,String> course_teacher;
        @FXML
        private TableColumn<Curriculum,Integer> class_hours;
        @FXML
        private TableColumn<Curriculum,String> course_nature;
        @FXML
        private TableColumn<Curriculum,Double> course_credit;
        @FXML
        private TableColumn<Curriculum,String> opening_term;
        @FXML
        private TableColumn<Curriculum,Integer> student_number;
        @FXML
        private TableColumn<Curriculum,String> course_name;
        @FXML
        private TableColumn<Curriculum,String> add;
        @FXML
        private TableColumn<Curriculum,String> del;
    
        @FXML
        private TextField id_m;
        @FXML
        private TextField name_m;
        @FXML
        private TextField garde_m;
        @FXML
        private TextField credit_m;
        @FXML
        private TextField number_m;
    
    
        @FXML
        private TableView tableView;
        private Student stu;
    
    
    
        public void  initialStudent(){
            String sql ="select * from student where student_id=%s";
            try {
                Statement statement = DBUtil.getConnection().createStatement();
                ResultSet rs = statement.executeQuery(String.format(sql,LoginAction.student.getId()));
                if (rs.next()) {
                    stu=Student.getAStudent(rs);
                }
    
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
    
    
        /**
         * 显示所有课程
         */
        @FXML
        public void showAllCourse(){
            initialStudent();
    
            List<Curriculum> allCourses=Curriculum.getAllCourse();
            show(allCourses);
    //        ObservableList<Curriculum> list = FXCollections.observableArrayList();
    //        showCourses(list, allCourses);
        }
    
        /**
         * 显示我的课程
         */
        @FXML
        public void showMyCourse(){
            initialStudent();
            List<Curriculum> allCourses=stu.getAllMyCourse();
            show(allCourses);
    //        ObservableList<Curriculum> list = FXCollections.observableArrayList();
    //        showCourses(list, allCourses);
        }
    
        /**
         * 添加课程
         */
        public void addCourse(Curriculum course){
            initialStudent();
           if(stu.addCourse(course)) {
               showMessage("选课成功");
           }
           else{
               showMessage("选课失败");
           }
           if(!isCreditEnough()){
                showMessage("总学分未修满15分!");
           }
        }
    
    
        /**
         * 退课
         */
        public void delCourse(Curriculum course){
            initialStudent();
    
            if(stu.delCourse(course)) {
                showMessage("退课成功");
            }
            else{
                showMessage("退课失败");
            }
            if(!isCreditEnough()){
                showMessage("目前修读总学分为:"+stu.getTotalCredit()+",总学分未修满15分!");
            }
        }
    
        @FXML
        public void findCourses(){
            String info =infoTxt.getText();
            initialStudent();
            List<Curriculum> allCourses=Curriculum.findCourses(info);
            show(allCourses);
    //
    //        ObservableList<Curriculum> list = FXCollections.observableArrayList();
    //        showCourses(list, allCourses);
        }
    
        @FXML
        public void editInfo(){
    
            garde_m.setEditable(true);
            number_m.setEditable(true);
        }
    
        /**
         * 修改班级,姓名
         */
        @FXML
        public void confirmInfo(){
            initialStudent();
            String garde=garde_m.getText();
            String name=name_m.getText();
            String sql="update student set student_name='%s',student_grade='%s' where student_id='%s'";
            try{
                Statement statement = DBUtil.getConnection().createStatement(); //2.创建statement类对象,用来执行SQL语句!!
    
                statement.executeUpdate(String.format(sql,name,garde,stu.getId()));
            } catch (SQLException throwables) {
                throwables.printStackTrace();
                showMessage("修改失败");
            }
            showMessage("修改成功");
            garde_m.setEditable(false);
            name_m.setEditable(false);
    
        }
    
        @FXML
        public void showMyInfo(){
            initialStudent();
            garde_m.setText(stu.getGrade());
            name_m.setText(stu.getName());
            id_m.setText(stu.getId());
            number_m.setText(Integer.toString(stu.getCourseNumber()));
            credit_m.setText(Double.toString(stu.getTotalCredit()));
        }
    
    
    
    
        public void showCourses(ObservableList<Curriculum> list,List<Curriculum> courses){
            //每次显示清空一次列表
            list.clear();
            for (Curriculum course : courses) {
    
                list.add(course);  //list添加值对象
            }
            course_id.setCellValueFactory(new PropertyValueFactory("id"));
            course_teacher.setCellValueFactory(new PropertyValueFactory("teacherName"));
            class_hours.setCellValueFactory(new PropertyValueFactory("classHours"));
            course_nature.setCellValueFactory(new PropertyValueFactory("nature"));
            course_credit.setCellValueFactory(new PropertyValueFactory("credit"));
            opening_term.setCellValueFactory(new PropertyValueFactory("openingSemester"));
            student_number.setCellValueFactory(new PropertyValueFactory("studentNumber"));
            course_name.setCellValueFactory(new PropertyValueFactory("name"));
    
            tableView.setItems(list);
        }
    
    
    
    
    
        public boolean isCreditEnough(){
            return stu.getTotalCredit()>=15;
        }
    
        public void showMessage(String info){
            Alert alert= new Alert(Alert.AlertType.INFORMATION);
            alert.setContentText(info);
            alert.showAndWait();
        }
    
    
        public void show( List<Curriculum> courses){
            ObservableList<Curriculum> list = FXCollections.observableArrayList();
    
    
            //每次显示清空一次列表
            list.clear();
            for (Curriculum course : courses) {
    
                list.add(course);  //list添加值对象
            }
            course_id.setCellValueFactory(new PropertyValueFactory("id"));
            course_teacher.setCellValueFactory(new PropertyValueFactory("teacherName"));
            class_hours.setCellValueFactory(new PropertyValueFactory("classHours"));
            course_nature.setCellValueFactory(new PropertyValueFactory("nature"));
            course_credit.setCellValueFactory(new PropertyValueFactory("credit"));
            opening_term.setCellValueFactory(new PropertyValueFactory("openingSemester"));
            student_number.setCellValueFactory(new PropertyValueFactory("studentNumber"));
            course_name.setCellValueFactory(new PropertyValueFactory("name"));
    
            //添加按钮进列表
            add.setCellFactory((col)->{
    
                        //UserLoad换成你自己的实体名称
                        TableCell<Curriculum, String> cell = new TableCell<Curriculum, String>(){
                            @Override
                            protected void updateItem(String item, boolean empty) {
                                super.updateItem(item, empty);
                                button1 = new Button("选课");
                                button1.setStyle("-fx-background-color: #00bcff;-fx-text-fill: #ffffff");
    
                                button1.setOnMouseClicked((col) -> {
    
                                    //获取list列表中的位置,进而获取列表对应的信息数据
                                    Curriculum course1 = list.get(getIndex());
                                    //按钮事件自己添加
                                    addCourse(course1);
    
                                });
    
                                if (empty) {
                                    //如果此列为空默认不添加元素
                                    setText(null);
                                    setGraphic(null);
                                } else {
                                    this.setGraphic(button1);
                                }
                            }
                        };
                        return cell;
                    }
            );
    
            del.setCellFactory((col)->{
                        TableCell<Curriculum, String> cell = new TableCell<Curriculum, String>(){
    
                            @Override
                            public void updateItem(String item, boolean empty) {
                                super.updateItem(item, empty);
                                //按钮显示文字
                                button2 = new Button("退课");
                                //设置按钮颜色
                                button2.setStyle("-fx-background-color: #00bcff;-fx-text-fill: #ffffff");
                                //按钮点击事件
                                button2.setOnMouseClicked((col) -> {
                                    //获取list列表中的位置,进而获取列表对应的信息数据
                                    Curriculum course2 = list.get(getIndex());
                                    //按钮事件自己添加
                                    delCourse(course2);
                                });
    
                                if (empty) {
                                    //如果此列为空默认不添加元素
                                    setText(null);
                                    setGraphic(null);
                                } else {
                                    //加载按钮
                                    this.setGraphic(button2);
                                }
                            }
    
    
    
                        };
                        return cell;
                    }
            );
            tableView.setItems(list);
    
        }
    }
    
    ==App==
    ```java
    package cn.edu.ncu.yang.view;
    
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Scene;
    import javafx.scene.layout.AnchorPane;
    import javafx.stage.Stage;
    
    public class App extends Application {
        @Override
        public void start(Stage primaryStage) throws Exception {
    
            AnchorPane root = FXMLLoader.load(getClass().getResource("login.fxml"));
            Scene scene = new Scene(root);
            primaryStage.setScene(scene);
            primaryStage.setTitle("登录");
            primaryStage.show();
        }
    }
    

    LoginAction

    package cn.edu.ncu.yang.view;
    
    import cn.edu.ncu.yang.entity.Adm;
    import cn.edu.ncu.yang.entity.Student;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.layout.AnchorPane;
    import javafx.stage.Stage;
    
    import java.io.IOException;
    
    public class LoginAction {
    
        public static Adm adm=null;
        public static Student student=null;
    
        @FXML
        private TextField idTxt;
    
        @FXML
        private PasswordField passwordTxt;
    
        @FXML
        private Button login_registerBt;
    
        @FXML
        private ToggleGroup selectID;
    
        @FXML
        private RadioButton stuRB;
        @FXML
        private RadioButton admRB;
    
    
    
    
    
        private Student stu;
        private String sql_id="select * from curriculum where course_id='id'";
    
        @FXML
        public void Login() throws IOException {
            var id=idTxt.getText();
            var password=passwordTxt.getText();
            if(stuRB.isSelected()){
                studentLogin(id,password);
                AnchorPane root = FXMLLoader.load(getClass().getResource("student.fxml"));
                var scene = new Scene(root);
                Stage stage = new Stage();
                stage.setScene(scene);
                stage.setTitle("学生登录");
                stage.show();
            }
            else if(admRB.isSelected()){
                admLogin(id, password);
                AnchorPane root = FXMLLoader.load(getClass().getResource("adm.fxml"));
                var scene = new Scene(root);
                Stage stage = new Stage();
                stage.setScene(scene);
                stage.setTitle("管理员登录");
                stage.show();
            }
    
        }
    
        public boolean studentLogin(String id,String password){
           this.student=Student.Login(id,password);
           return this.student!=null;
    
        }
    
        public boolean admLogin(String id,String password){
            this.adm=Adm.Login(id,password);
            return this.adm!=null;
        }
    
    
    
    }
    

    fxml文件

    fxml文件用scene builder拖拽生成 yyds

    login.fxml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <?import javafx.scene.control.Button?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.Tab?>
    <?import javafx.scene.control.TabPane?>
    <?import javafx.scene.control.TableColumn?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.control.TextField?>
    <?import javafx.scene.image.Image?>
    <?import javafx.scene.image.ImageView?>
    <?import javafx.scene.layout.AnchorPane?>
    <?import javafx.scene.layout.Pane?>
    <?import javafx.scene.text.Font?>
    
    <AnchorPane prefHeight="433.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.ncu.yang.controller.AdmAction">
       <children>
          <ImageView fitHeight="645.0" fitWidth="671.0" layoutX="4.0" layoutY="47.0" pickOnBounds="true" preserveRatio="true">
             <image>
                <Image url="@images/桌面.jpg" />
             </image>
          </ImageView>
          <TabPane layoutX="10.0" layoutY="17.0" prefHeight="425.0" prefWidth="640.0" tabClosingPolicy="UNAVAILABLE">
             <tabs>
                <Tab text="查看全部课程">
                   <content>
                      <TableView fx:id="tableView" prefHeight="376.0" prefWidth="644.0">
                         <columns>
                            <TableColumn fx:id="courseId" prefWidth="75.0" text="课程编号" />
                            <TableColumn fx:id="courseName" prefWidth="75.0" text="课程名" />
                            <TableColumn fx:id="courseTeacher" prefWidth="75.0" text="授课老师" />
                            <TableColumn fx:id="courseCredit" prefWidth="75.0" text="课程学分" />
                            <TableColumn fx:id="classHours" prefWidth="75.0" text="学时" />
                            <TableColumn fx:id="openingTerm" prefWidth="75.0" text="开课学期" />
                            <TableColumn fx:id="courseNature" prefWidth="75.0" text="课程性质" />
                            <TableColumn fx:id="classNumber" prefWidth="65.99993896484375" text="课程人数" />
                            <TableColumn  prefWidth="49.3333740234375">
                               <graphic>
                                  <Button mnemonicParsing="false" onAction="#showAllCourse" text="刷新" />
                               </graphic>
                            </TableColumn>
                         </columns>
                      </TableView>
                   </content>
                </Tab>
                <Tab text="添加课程">
                   <content>
                      <Pane prefHeight="200.0" prefWidth="200.0">
                         <children>
                            <Label layoutX="71.0" layoutY="48.0" text="课程编号:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="71.0" layoutY="83.0" text="授课老师:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="103.0" layoutY="124.0" text="学时:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="103.0" layoutY="159.0" text="学分:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="71.0" layoutY="198.0" prefHeight="22.0" prefWidth="80.0" text="开课学期:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="63.0" layoutY="238.0" text="课程性质:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <TextField fx:id="idTxt" layoutX="175.0" layoutY="47.0" />
                            <TextField fx:id="teacherTxt" layoutX="175.0" layoutY="83.0" />
                            <TextField fx:id="hoursTxt" layoutX="175.0" layoutY="124.0" />
                            <TextField fx:id="creditTxt" layoutX="175.0" layoutY="159.0" />
                            <TextField fx:id="termTxt" layoutX="175.0" layoutY="198.0" />
                            <TextField fx:id="natureTxt" layoutX="175.0" layoutY="237.0" />
                            <Button layoutX="185.0" layoutY="321.0" mnemonicParsing="false" onAction="#addCourse" text="添加课程">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Button>
                            <TextField fx:id="nameTxt" layoutX="175.0" layoutY="277.0" />
                            <Label layoutX="79.0" layoutY="277.0" text="课程名:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                         </children>
                      </Pane>
                   </content>
                </Tab>
                <Tab text="删除课程">
                   <content>
                      <Pane prefHeight="200.0" prefWidth="200.0">
                         <children>
                            <Button layoutX="434.0" layoutY="50.0" mnemonicParsing="false" onAction="#delCourse" text="删除" />
                            <Label layoutX="35.0" layoutY="50.0" text="输入课程编号:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <TextField fx:id="delTxt" layoutX="159.0" layoutY="49.0" />
                         </children>
                      </Pane>
                   </content>
                </Tab>
             </tabs>
          </TabPane>
       </children>
    </AnchorPane>
    

    adm.fxml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <?import javafx.scene.control.Button?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.Tab?>
    <?import javafx.scene.control.TabPane?>
    <?import javafx.scene.control.TableColumn?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.control.TextField?>
    <?import javafx.scene.image.Image?>
    <?import javafx.scene.image.ImageView?>
    <?import javafx.scene.layout.AnchorPane?>
    <?import javafx.scene.layout.Pane?>
    <?import javafx.scene.text.Font?>
    
    <AnchorPane prefHeight="433.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.ncu.yang.controller.AdmAction">
       <children>
          <ImageView fitHeight="645.0" fitWidth="671.0" layoutX="4.0" layoutY="47.0" pickOnBounds="true" preserveRatio="true">
             <image>
                <Image url="@images/桌面.jpg" />
             </image>
          </ImageView>
          <TabPane layoutX="10.0" layoutY="17.0" prefHeight="425.0" prefWidth="640.0" tabClosingPolicy="UNAVAILABLE">
             <tabs>
                <Tab text="查看全部课程">
                   <content>
                      <TableView fx:id="tableView" prefHeight="376.0" prefWidth="644.0">
                         <columns>
                            <TableColumn fx:id="courseId" prefWidth="75.0" text="课程编号" />
                            <TableColumn fx:id="courseName" prefWidth="75.0" text="课程名" />
                            <TableColumn fx:id="courseTeacher" prefWidth="75.0" text="授课老师" />
                            <TableColumn fx:id="courseCredit" prefWidth="75.0" text="课程学分" />
                            <TableColumn fx:id="classHours" prefWidth="75.0" text="学时" />
                            <TableColumn fx:id="openingTerm" prefWidth="75.0" text="开课学期" />
                            <TableColumn fx:id="courseNature" prefWidth="75.0" text="课程性质" />
                            <TableColumn fx:id="classNumber" prefWidth="65.99993896484375" text="课程人数" />
                            <TableColumn  prefWidth="49.3333740234375">
                               <graphic>
                                  <Button mnemonicParsing="false" onAction="#showAllCourse" text="刷新" />
                               </graphic>
                            </TableColumn>
                         </columns>
                      </TableView>
                   </content>
                </Tab>
                <Tab text="添加课程">
                   <content>
                      <Pane prefHeight="200.0" prefWidth="200.0">
                         <children>
                            <Label layoutX="71.0" layoutY="48.0" text="课程编号:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="71.0" layoutY="83.0" text="授课老师:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="103.0" layoutY="124.0" text="学时:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="103.0" layoutY="159.0" text="学分:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="71.0" layoutY="198.0" prefHeight="22.0" prefWidth="80.0" text="开课学期:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <Label layoutX="63.0" layoutY="238.0" text="课程性质:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <TextField fx:id="idTxt" layoutX="175.0" layoutY="47.0" />
                            <TextField fx:id="teacherTxt" layoutX="175.0" layoutY="83.0" />
                            <TextField fx:id="hoursTxt" layoutX="175.0" layoutY="124.0" />
                            <TextField fx:id="creditTxt" layoutX="175.0" layoutY="159.0" />
                            <TextField fx:id="termTxt" layoutX="175.0" layoutY="198.0" />
                            <TextField fx:id="natureTxt" layoutX="175.0" layoutY="237.0" />
                            <Button layoutX="185.0" layoutY="321.0" mnemonicParsing="false" onAction="#addCourse" text="添加课程">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Button>
                            <TextField fx:id="nameTxt" layoutX="175.0" layoutY="277.0" />
                            <Label layoutX="79.0" layoutY="277.0" text="课程名:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                         </children>
                      </Pane>
                   </content>
                </Tab>
                <Tab text="删除课程">
                   <content>
                      <Pane prefHeight="200.0" prefWidth="200.0">
                         <children>
                            <Button layoutX="434.0" layoutY="50.0" mnemonicParsing="false" onAction="#delCourse" text="删除" />
                            <Label layoutX="35.0" layoutY="50.0" text="输入课程编号:">
                               <font>
                                  <Font size="16.0" />
                               </font>
                            </Label>
                            <TextField fx:id="delTxt" layoutX="159.0" layoutY="49.0" />
                         </children>
                      </Pane>
                   </content>
                </Tab>
             </tabs>
          </TabPane>
       </children>
    </AnchorPane>
    

    student.fxml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <?import javafx.scene.control.Button?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.Tab?>
    <?import javafx.scene.control.TabPane?>
    <?import javafx.scene.control.TableColumn?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.control.TextField?>
    <?import javafx.scene.image.Image?>
    <?import javafx.scene.image.ImageView?>
    <?import javafx.scene.layout.AnchorPane?>
    
    <AnchorPane prefHeight="548.0" prefWidth="699.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.ncu.yang.controller.StudentAction">
       <children>
          <ImageView fitHeight="532.0" fitWidth="680.0" layoutX="1.0" layoutY="56.0" opacity="0.44" pickOnBounds="true" preserveRatio="true">
             <image>
                <Image url="@images/叶子.jpg" />
             </image>
          </ImageView>
          <TabPane layoutY="-2.0" prefHeight="573.0" prefWidth="686.0" tabClosingPolicy="UNAVAILABLE">
            <tabs>
              <Tab text="首页">
                <content>
                  <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                         <children>
                            <TableView fx:id="tableView" layoutY="23.0" prefHeight="519.0" prefWidth="686.0">
                               <columns>
                                  <TableColumn fx:id="course_id" prefWidth="56.000001311302185" text="课程编号" />
                                  <TableColumn fx:id="course_name" minWidth="9.999969482421875" prefWidth="59.99997329711914" text="课程名" />
                                  <TableColumn fx:id="course_teacher" prefWidth="66.00000762939453" text="授课老师" />
                                  <TableColumn fx:id="course_credit" prefWidth="74.66661071777344" text="课程学分" />
                                  <TableColumn fx:id="class_hours" minWidth="0.0" prefWidth="64.66668701171875" text="学时" />
                                  <TableColumn fx:id="opening_term" prefWidth="78.0" text="开课学期" />
                                  <TableColumn fx:id="student_number" prefWidth="95.99993896484375" text="课程人数" />
                                  <TableColumn fx:id="course_nature" minWidth="0.0" prefWidth="78.66665649414062" text="课程性质" />
                                  <TableColumn fx:id="action" minWidth="0.0" prefWidth="108.6666259765625" text="操作">
                                      <columns>
                                          <TableColumn fx:id="add" prefWidth="60.0" text="选课" />
                                          <TableColumn fx:id="del" minWidth="0.0" prefWidth="48.6666259765625" text="退课" />
                                      </columns>
                                  </TableColumn>
                               </columns>
                            </TableView>
                            <TextField fx:id="infoTxt" layoutY="2.0" prefHeight="23.0" prefWidth="215.0" promptText="课程编号/授课老师/课程名/课程学分" />
                            <Button layoutX="491.0" layoutY="2.0" mnemonicParsing="false" onAction="#showAllCourse" prefHeight="23.0" prefWidth="92.0" text="查看所有课程" />
                            <Button layoutX="583.0" layoutY="2.0" mnemonicParsing="false" onAction="#showMyCourse" prefHeight="23.0" prefWidth="96.0" text="查看我的课程" />
                            <Button layoutX="209.0" layoutY="2.0" mnemonicParsing="false" onAction="#findCourses" text="查询" />
                         </children>
                      </AnchorPane>
                </content>
              </Tab>
                <Tab text="我的信息">
                  <content>
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="517.0" prefWidth="698.0">
                         <children>
                            <Button layoutX="584.0" layoutY="2.0" mnemonicParsing="false" onAction="#editInfo" text="编辑我的信息" />
                            <TextField fx:id="garde_m" editable="false" AnchorPane.leftAnchor="140.0" AnchorPane.topAnchor="155.0" />
                            <Button layoutX="435.0" layoutY="156.0" mnemonicParsing="false" onAction="#confirmInfo" text="确认修改" />
                            <TextField fx:id="id_m" editable="false" AnchorPane.leftAnchor="140.0" AnchorPane.topAnchor="105.0" />
                            <TextField fx:id="credit_m" editable="false" AnchorPane.leftAnchor="140.0" AnchorPane.topAnchor="205.0" />
                            <TextField fx:id="number_m" editable="false" AnchorPane.leftAnchor="140.0" AnchorPane.topAnchor="255.0" />
                            <Label text="总学分:" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="210.0" />
                            <TextField fx:id="name_m" editable="false" AnchorPane.leftAnchor="140.0" AnchorPane.topAnchor="55.0" />
                            <Label text="所修课程/门:" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="260.0" />
                            <Label text="班级:" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="160.0" />
                            <Label layoutX="14.0" layoutY="6.0" text="姓名:" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="60.0" />
                            <Label text="学号:" AnchorPane.leftAnchor="30.0" AnchorPane.topAnchor="110.0" />
                            <Button onAction="#showMyInfo" layoutX="544.0" layoutY="2.0" mnemonicParsing="false" text="刷新" />
                         </children>
                      </AnchorPane>
                  </content>
                </Tab>
            </tabs>
          </TabPane>
       </children>
    </AnchorPane>
    
    展开全文
    m0_52556320 2021-12-13 23:39:45
  • java swing开发学生选课系统 数据库使用MySQL 该系统主要包括学生和管理员两个用户角色 以学生角色登陆进去 学生可以查看自己的选修课情况 修改自己的个人信息 以管理员的角色登陆进去,管理员可以查看选修课的选修...

    java swing开发学生选课系统 数据库使用MySQL
    该系统主要包括学生和管理员两个用户角色 以学生角色登陆进去 学生可以查看自己的选修课情况 修改自己的个人信息
    以管理员的角色登陆进去,管理员可以查看选修课的选修情况 增加选修课,查看学生的个人情况

     

    数据库创建代码:

    /*
     Navicat Premium Data Transfer
    
     Source Server         : localhost
     Source Server Type    : MySQL
     Source Server Version : 50527
     Source Host           : localhost:3306
     Source Schema         : chenji
    
     Target Server Type    : MySQL
     Target Server Version : 50527
     File Encoding         : 65001
    
     Date: 13/10/2019 11:34:33
    */
    
    SET NAMES utf8mb4;
    SET FOREIGN_KEY_CHECKS = 0;
    
    -- ----------------------------
    -- Table structure for stu
    -- ----------------------------
    DROP TABLE IF EXISTS `stu`;
    CREATE TABLE `stu`  (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `Chinese` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `Math` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `English` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `class` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      PRIMARY KEY (`id`) USING BTREE
    ) ENGINE = InnoDB AUTO_INCREMENT = 789457 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
    
    -- ----------------------------
    -- Records of stu
    -- ----------------------------
    INSERT INTO `stu` VALUES (123456, '清明', '80', '90', '100', '1203班');
    INSERT INTO `stu` VALUES (789456, '史蒂夫', '100', '100', '80', '1203班');
    
    -- ----------------------------
    -- Table structure for teacher
    -- ----------------------------
    DROP TABLE IF EXISTS `teacher`;
    CREATE TABLE `teacher`  (
      `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `course` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `class` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
      `age` int(11) NULL DEFAULT NULL
    ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
    
    -- ----------------------------
    -- Records of teacher
    -- ----------------------------
    INSERT INTO `teacher` VALUES ('天明', '语文', '1203班', '8', 18);
    INSERT INTO `teacher` VALUES ('王老师', '数学', '123456班', '60', 30);
    
    SET FOREIGN_KEY_CHECKS = 1;
    

     

    展开全文
    tianmingCode 2019-12-26 21:52:44
  • 12.95MB sanliangguangyin 2019-04-13 14:22:45
  • 15KB qq_38525264 2018-04-19 11:07:53
  • 2.16MB qq_43630441 2020-06-21 20:37:17
  • 本文为大家分享了java实现学生选课系统的具体代码,供大家参考,具体内容如下案例要求:学生(学号,姓名,专业,所选课程{<3})老师(工号,姓名,所教课程{<3})课程(课程号,课程名,学分,教师,已选课学生{&...

    本文为大家分享了java实现学生选课系统的具体代码,供大家参考,具体内容如下

    案例要求:

    学生(学号,姓名,专业,所选课程{<3})

    老师(工号,姓名,所教课程{<3})

    课程(课程号,课程名,学分,教师,已选课学生{<30})

    选课系统代码如下:

    //teacher

    public class Teacher {

    private int id;

    private String teacherName;

    private Course[] courses;

    //构造函数

    public Teacher() {

    super();

    courses= new Course[3];

    }

    public Teacher(int id,String teacherName){

    this.id=id;

    this.teacherName=teacherName;

    courses = new Course[3];

    }

    //修改或是添加属性

    public int getId() {

    return id;

    }

    public void setId(int id) {

    this.id = id;

    }

    public String getTeacherName() {

    return teacherName;

    }

    public void setTeacherName(String teacherName) {

    this.teacherName = teacherName;

    }

    }

    /**

    * 课程

    */

    public class Course {

    private String courseName;

    private int courseId;

    private Teacher teacher;

    private float credit;

    private Student[] students;

    //构造函数

    public Course(int courseId,String courseName,float credit,Teacher teacher) {

    super();

    this.courseId=courseId;

    this.courseName=courseName;

    this.credit=credit;

    this.setTeacher(teacher);

    students = new Student[30];

    }

    public Course(int courseId,String courseName,float credit) {

    super();

    this.courseId=courseId;

    this.courseName=courseName;

    this.credit=credit;

    students = new Student[30];

    }

    public Course(int courseId,String courseName) {

    super();

    this.courseId=courseId;

    this.courseName=courseName;

    students = new Student[30];

    }

    public Course() {//默认形式,要有以防万一

    super();

    students = new Student[30];

    }

    //修改或获取属性值id,name,credit,

    public void setId(int id){

    this.courseId=id;

    }

    public int getId(){

    return this.courseId;

    }

    public void setName(String name){

    this.courseName=name;

    }

    public String getName(){

    return this.courseName;

    }

    public void setCredit(float credit ){

    this.credit=credit;

    }

    public float getCredit(){

    return this.credit;

    }

    public Teacher getTeacher() {

    return teacher;

    }

    public void setTeacher(Teacher teacher) {

    this.teacher = teacher;

    }

    //课加入学生

    public boolean addStudent(Student stu){

    boolean flag = false;//标志值:是否加入成功

    //如果学生没有选过这门课,同时课的学生还没满则执行

    if(!isSelectedStudent(stu)&&isNullStudent(stu)){

    for(int i=0;i

    if(students[i]==null){

    students[i]=stu;

    flag=true;

    break;

    }

    }

    }

    return flag;

    }

    //课移除学生

    public boolean removeStudent(Student stu){

    boolean flag=false;

    if(isSelectedStudent(stu)){//选过这门课

    for(int i=0;i

    if(students[i]==stu){

    students[i]=null;

    flag=true;

    break;

    }

    }

    }

    return flag;

    }

    //显示选择课程的学生:

    public void displayStudent(){

    System.out.println("选择的课程:"+this.courseName+"的学生有:");

    for(Student s:students){

    if(s!=null){

    System.out.print(s.getStuName()+" ");

    }

    }

    System.out.println();

    }

    //子方法1:学生是否选过这门课

    public boolean isSelectedStudent(Student stu){

    boolean flag=false;

    for(Student s:students){//只能用于检查,不能修改

    if(s==stu){

    flag=true;

    break;

    }

    }

    return flag;

    }

    //子方法2:学科学生未达到限定人数吗

    public boolean isNullStudent(Student stu){

    boolean flag=false;

    for(Student s:students){

    if(s==null){//还有空位

    flag=true;

    break;

    }

    }

    return flag;

    }

    public static void main(String[] args) {

    // TODO Auto-generated method stub

    }

    }

    /**

    * 学生代码

    * @author Floris0811

    */

    public class Student {

    private String stuName;

    private int stuId;

    private String major;

    private Course[] courses;

    //构造函数

    public Student() {//不要忘

    super();

    courses = new Course[3];

    }

    public Student(int stuId,String stuName) {

    super();

    this.stuId=stuId;

    this.stuName=stuName;

    courses = new Course[3];

    }

    public Student(int stuId,String stuName,String major) {

    super();

    this.stuId=stuId;

    this.stuName=stuName;

    this.major = major;

    courses = new Course[3];

    }

    //修改获取属性name,id,major

    public String getStuName() {

    return stuName;

    }

    public void setStuName(String stuName) {

    this.stuName = stuName;

    }

    public int getStuId() {

    return stuId;

    }

    public void setStuId(int stuId) {

    this.stuId = stuId;

    }

    public String getMajor() {

    return major;

    }

    public void setMajor(String major) {

    this.major = major;

    }

    //学生选课;

    public boolean addCourse(Course course){

    boolean flag=false;

    if(!isSelectedCourse(course)&&isNullCourse(course)){

    for(int i=0;i

    if(courses[i]==null){

    courses[i]=course;

    course.addStudent(this);//课程也要添加学生

    flag=true;

    break;

    }

    }

    }

    return flag;

    }

    //学生移除课程

    public boolean removeCourse(Course course){

    boolean flag=false;

    if(isSelectedCourse(course)){

    for(int i=0;i

    if(courses[i]==course){

    courses[i]=null;

    course.removeStudent(this);//在课程中移除学生

    flag=true;

    break;

    }

    }

    }

    return flag;

    }

    //显示学生所选的课程

    public void displayCourse(){

    System.out.println("学生"+this.stuName+"所选课程有:");

    for(Course c:courses){

    if(c!=null){

    System.out.print(c.getName()+" ");

    }

    }

    System.out.println();

    }

    //子方法1:课是否被选过

    public boolean isSelectedCourse(Course course){

    boolean flag=false;

    for(Course c:courses){

    if(c==course){

    flag=true;

    break;

    }

    }

    return flag;

    }

    //子方法2:学生是否还有选修课位置

    public boolean isNullCourse(Course course){

    boolean flag=false;

    for(Course c:courses){

    if(c==null){

    flag=true;

    break;

    }

    }

    return flag;

    }

    }

    package test;

    public class ChooseCourseByStu {

    /**

    * 选课管理系统

    */

    public static void main(String[] args) {

    Student stu0 = new Student(1001,"Lily");

    Student stu1 = new Student(1002,"Eilly");

    Student stu2 = new Student(1003,"Floris");

    Student stu3 = new Student(1004,"HaHa");

    Course cour0 = new Course(001,"高数");

    Course cour1 = new Course(002,"线代");

    Course cour2 = new Course(003,"概率论");

    stu0.addCourse(cour0);

    stu0.addCourse(cour2);

    stu0.addCourse(cour1);

    stu1.addCourse(cour2);

    stu1.addCourse(cour0);

    stu2.addCourse(cour1);

    stu3.addCourse(cour0);

    stu3.addCourse(cour1);

    stu1.removeCourse(cour2);

    stu0.displayCourse();

    cour0.removeStudent(stu1);

    cour1.displayStudent();

    }

    }

    关于管理系统的更多内容请点击《管理系统专题》进行学习

    以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

    展开全文
    weixin_29635919 2021-02-12 10:42:24
  • 4星
    5.94MB weixin_43165742 2019-07-21 09:34:11
  • 【实例简介】JAVA学生选课系统,里面有完整的代码希望这些可以更好的帮助你们,如果你们在途中遇到什么困难的话可以尽情的找我【实例截图】【核心代码】StudentCYF└── StudentCYF├── src│ ├── ...

    【实例简介】

    JAVA学生选课系统,里面有完整的代码希望这些可以更好的帮助你们,如果你们在途中遇到什么困难的话可以尽情的找我

    【实例截图】

    【核心代码】

    StudentCYF

    └── StudentCYF

    ├── src

    │   ├── applicationContext.xml

    │   ├── org

    │   │   ├── action

    │   │   │   ├── LoginAction.java

    │   │   │   └── XsAction.java

    │   │   ├── dao

    │   │   │   ├── DlDao.java

    │   │   │   ├── imp

    │   │   │   │   ├── DlDaoImp.java

    │   │   │   │   ├── KcDaoImp.java

    │   │   │   │   ├── XsDaoImp.java

    │   │   │   │   └── ZyDaoImp.java

    │   │   │   ├── KcDao.java

    │   │   │   ├── XsDao.java

    │   │   │   └── ZyDao.java

    │   │   ├── model

    │   │   │   ├── Dlb.hbm.xml

    │   │   │   ├── Dlb.java

    │   │   │   ├── Kcb.hbm.xml

    │   │   │   ├── Kcb.java

    │   │   │   ├── Xsb.hbm.xml

    │   │   │   ├── Xsb.java

    │   │   │   ├── Zyb.hbm.xml

    │   │   │   └── Zyb.java

    │   │   └── util

    │   │   └── TestDlDao.java

    │   ├── struts.properties

    │   └── struts.xml

    └── WebRoot

    ├── allKc.jsp

    ├── deleteKc_success.jsp

    ├── head.jsp

    ├── index.jsp

    ├── left.jsp

    ├── login.jsp

    ├── main.jsp

    ├── META-INF

    │   └── MANIFEST.MF

    ├── right.jsp

    ├── selectKc_fail.jsp

    ├── selectKc_success.jsp

    ├── test.jsp

    ├── updateXsInfo.jsp

    ├── updateXs_success.jsp

    ├── WEB-INF

    │   ├── classes

    │   │   ├── applicationContext.xml

    │   │   ├── org

    │   │   │   ├── action

    │   │   │   │   ├── LoginAction.class

    │   │   │   │   └── XsAction.class

    │   │   │   ├── dao

    │   │   │   │   ├── DlDao.class

    │   │   │   │   ├── imp

    │   │   │   │   │   ├── DlDaoImp.class

    │   │   │   │   │   ├── KcDaoImp.class

    │   │   │   │   │   ├── XsDaoImp.class

    │   │   │   │   │   └── ZyDaoImp.class

    │   │   │   │   ├── KcDao.class

    │   │   │   │   ├── XsDao.class

    │   │   │   │   └── ZyDao.class

    │   │   │   ├── model

    │   │   │   │   ├── Dlb.class

    │   │   │   │   ├── Dlb.hbm.xml

    │   │   │   │   ├── Kcb.class

    │   │   │   │   ├── Kcb.hbm.xml

    │   │   │   │   ├── Xsb.class

    │   │   │   │   ├── Xsb.hbm.xml

    │   │   │   │   ├── Zyb.class

    │   │   │   │   └── Zyb.hbm.xml

    │   │   │   └── util

    │   │   │   └── TestDlDao.class

    │   │   ├── struts.properties

    │   │   └── struts.xml

    │   ├── lib

    │   │   ├── antlr-2.7.6.jar

    │   │   ├── cglib-full-2.0.2.jar

    │   │   ├── commons-beanutils-1.7.0.jar

    │   │   ├── commons-beanutils-1.9.2.jar

    │   │   ├── commons-collections-3.1.jar

    │   │   ├── commons-collections-3.2.1.jar

    │   │   ├── commons-dbcp-1.1.jar

    │   │   ├── commons-fileupload-1.2.1.jar

    │   │   ├── commons-fileupload-1.2.2.jar

    │   │   ├── commons-httpclient-3.1.jar

    │   │   ├── commons-io.jar

    │   │   ├── commons-lang-2.3.jar

    │   │   ├── commons-lang-2.6.jar

    │   │   ├── commons-logging-1.1.1.jar

    │   │   ├── commons-logging-1.1.jar

    │   │   ├── commons-logging-1.2.jar

    │   │   ├── commons-pool-1.3.jar

    │   │   ├── dom4j-1.6.1.jar

    │   │   ├── ezmorph-1.0.3.jar

    │   │   ├── ezmorph-1.0.6.jar

    │   │   ├── fastjson-1.2.2.jar

    │   │   ├── fastjson-1.2.2-sources.jar

    │   │   ├── freemarker-2.3.15.jar

    │   │   ├── hibernate3.jar

    │   │   ├── javassist-3.9.0.jar

    │   │   ├── javax.servlet-api-3.1.0.jar

    │   │   ├── json-lib-2.2.3-jdk15.jar

    │   │   ├── json-lib-2.4-jdk15.jar

    │   │   ├── jsoup-1.6.1.jar

    │   │   ├── jstl-1.2.jar

    │   │   ├── jta-1.1.jar

    │   │   ├── jtds-1.2.jar

    │   │   ├── junit-3.8.2.jar

    │   │   ├── log4j-1.2.15.jar

    │   │   ├── mysql-connector-java-5.0.8.jar

    │   │   ├── mysql-connector-java-5.1.18-bin.jar

    │   │   ├── ognl-2.7.3.jar

    │   │   ├── ojdbc14.jar

    │   │   ├── orai18n.jar

    │   │   ├── poi-3.8-20120326.jar

    │   │   ├── poi-ooxml-3.8-20120326.jar

    │   │   ├── poi-ooxml-schemas-3.8-20120326.jar

    │   │   ├── slf4j-api-1.5.3.jar

    │   │   ├── slf4j-nop-1.5.3.jar

    │   │   ├── spring.jar

    │   │   ├── sqljdbc4.jar

    │   │   ├── standard-1.1.2.jar

    │   │   ├── struts2-core-2.1.8.jar

    │   │   ├── struts2-dojo-plugin-2.1.8.jar

    │   │   ├── struts2-json-plugin-2.1.8.jar

    │   │   ├── struts2-spring-plugin-2.1.8.jar

    │   │   ├── taobao-sdk-java-auto_1456285954021-20160407.jar

    │   │   ├── taobao-sdk-java-auto_1456285954021-20160407-source.jar

    │   │   ├── ueditor.jar

    │   │   ├── xmlbeans-2.3.0.jar

    │   │   └── xwork-core-2.1.6.jar

    │   └── web.xml

    ├── xsInfo.jsp

    └── xsKcs.jsp

    19 directories, 117 files

    展开全文
    weixin_42513269 2021-04-17 04:23:28
  • weixin_34551614 2021-03-05 16:48:50
  • 4星
    179KB dlpf_c 2018-07-31 21:32:32
  • qq_54141095 2021-10-24 20:25:54
  • 497KB ZR__MaNong 2020-06-15 16:29:31
  • 8.65MB qq_40357843 2019-05-07 11:39:40
  • weixin_36376765 2021-03-13 17:12:07
  • weixin_34022406 2021-02-12 10:42:21
  • 2.16MB qq_31536103 2021-12-06 17:30:52
  • 228KB qq_44140450 2020-12-18 21:39:52
  • 4星
    4.26MB u014087478 2014-11-15 09:05:26
  • weixin_39824191 2021-02-12 10:42:24

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 8,138
精华内容 3,255
关键字:

学生选课系统java

java 订阅