public ArrayList<Course> courses(ResultSet rs) throws Exception {
        DBConnector db = new DBConnector();
        ArrayList<Course> data = new ArrayList<>();
        while (rs.next()) {
            data.add(new Course(db.getCourse(rs.getInt("courseid"))));
        }
        return data;
    }