-
大小: 15.71MB文件類型: .rar金幣: 1下載: 0 次發布日期: 2023-06-20
- 語言: Java
- 標簽: Java-MySQL??
資源簡介
基于Java 的選課系統:
具體的要求:
1、 本系統有三類用戶,教師,學生,管理員,各自的功能如下:
(1) 教師:
所包含功能為:
A, 注冊功能:主要信息包括:用戶名,密碼,教師姓名,年齡,性別,專業,職稱;
B, 修改個人信息:包括姓名,聯系方式(郵箱,qq,和手機密碼);
C, 發布本學期開設的課程,本界面的內容包括:課程名稱,課程學時,課程要求,課程要講的內容,考核方式。
D, 查看某一門課程的選課情況(看有哪些學生選課),用表格展示;
E, 將選擇自己課程的學生以Excel 的形式導出;
(2) 學生:
A, 注冊功能:主要信息包括:用戶名,密碼,姓名,年齡,性別,專業,班級,學號;
B, 修改個人信息:包括姓名,聯系方式(郵箱,qq,和手機密碼);
C, 查看所有教師的開課情況,具體的操作是:先選擇老師,然后列出該老師的所有課程(可以用List實現);,點擊課程,顯示該課程的情況;
D, 選課:選擇某一個老師的課程。
(3)管理員
管理員登錄后,主要的功能:
A 審核老師發布的課程,沒有審核或者審核沒通過的課程,學生是無法選課的;
代碼片段和文件信息
package?jiemian;
import?java.awt.Color;
import?java.awt.Container;
import?java.awt.GridLayout;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?java.sql.ResultSet;
import?java.util.Vector;
import?javax.swing.BorderFactory;
import?javax.swing.JButton;
import?javax.swing.Jframe;
import?javax.swing.JList;
import?javax.swing.JScrollPane;
import?javax.swing.JTable;
import?javax.swing.JTextField;
import?javax.swing.ListSelectionModel;
import?model.vo.Teacher;
import?util.db.DBManager;
public?class?chakankaike?{
Jframe?frame?=?new?Jframe(“全部課程“);
public?chakankaike()
{
frame.getContentPane().setBackground(Color.green);
Container?cont?=?frame.getContentPane();
Vector?a?=?new?Vector();
JList?list=?null;
frame.setLayout(null);
String?sql;
DBManager?db=new?DBManager();
ResultSet?rs=?null;
int?t=?0;
String?h[]?=?new?String?[100];
sql?=?“select?*?from?course“;
try?{
rs?=?db.executeQuery(sql);
while(rs.next())
{
h[t]?=?rs.getString(“courseID“)+“??????????“+rs.getString(“coursename“)+“?????????“
+rs.getString(“information“)+“??????“+rs.getString(“request“)+“?????“+
rs.getString(“teacherID“)+“?????????“+rs.getInt(“content“)+“????????????“
+rs.getInt(“state“);
a.add(h[t]);
t++;
}
System.out.println(“課程數目:“+t);
}?
catch?(Exception?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
finally{
try?{
db.close();
}?catch?(Exception?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
}
list?=?new?JList(a);
String?title?=?“courseID??“+“coursename??“+“information??“+“request??“+“teacherID??“+“content??“+“state“;
list.setBorder(BorderFactory.createtitledBorder(title));
list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
cont.add(list);
list.setBounds(20?20?480?400);
//刷新按鈕及其監聽事件
JButton?shuaxin?=?new?JButton(“刷新“);
frame.add(shuaxin);
shuaxin.setBounds(500?120?80?25);
shuaxin.addActionListener(new?ActionListener()
{
public?void?actionPerformed(ActionEvent?arg2)
{
shuaxin();
}
}
);
frame.setSize(600?500);
frame.setLocation(650?200);
frame.setVisible(true);
}
void?shuaxin()
{
frame.setLayout(null);
//顯示全部課程
// JButton?shenhe?=?new?JButton(“審核“);
// frame.add(shenhe);
Container?cont?=?frame.getContentPane();
Vector?a?=?new?Vector();
JList?list=?null;
frame.setLayout(null);
String?sql;
DBManager?db=new?DBManager();
ResultSet?rs=?null;
int?t=?0;
String?h[]?=?new?String?[100];
sql?=?“select?*?from?course“;
try?{
rs?=?db.executeQuery(sql);
while(rs.next())
{
h[t]?=?rs.getString(“courseID“)+“??????????“+rs.getString(“coursename“)+“?????????“
+rs.getString(“information“)+“??????“+rs.
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????14288??2016-12-11?21:34??java大作業.docx
?????文件?????720702??2016-12-19?16:01??jxl.jar
?????文件?????703265??2016-12-13?19:48??mysql-connector-java-5.1.6-bin.jar
?????文件????????379??2016-12-25?14:07??使用說明.txt
?????文件????????907??2016-12-14?17:00??MySQL-Front.lnk
?????文件???????2863??2009-01-23?15:07??UniServer4_1\UniServer\disk_start.vbs
?????文件???????6875??2009-03-04?09:21??UniServer4_1\UniServer\Server_Start.bat
?????文件???????1325??2009-02-28?07:33??UniServer4_1\UniServer\Stop.bat
?????文件????????292??2008-12-24?19:38??UniServer4_1\UniServer\udrive\cgi-bin\test.pl
?????文件???????8122??2009-04-02?18:27??UniServer4_1\UniServer\udrive\docs\CHANGE?LOG.txt
????..A.SH.????????48??2007-06-02?02:51??UniServer4_1\UniServer\udrive\docs\desktop.ini
?????文件???????3963??2009-01-11?17:46??UniServer4_1\UniServer\udrive\docs\Enable?SSL.txt
?????文件???????3182??2009-03-04?09:39??UniServer4_1\UniServer\udrive\docs\Install?Options.txt
?????文件???????1659??2008-12-24?19:48??UniServer4_1\UniServer\udrive\docs\LICENSE.txt
?????文件???????3128??2009-02-28?07:37??UniServer4_1\UniServer\udrive\docs\Move?Server.txt
?????文件???????1768??2008-12-24?20:31??UniServer4_1\UniServer\udrive\docs\READ?ME.txt
?????文件???????3356??2009-01-09?15:36??UniServer4_1\UniServer\udrive\docs\SERVER?STRUCTURE.txt
?????文件??????11756??2008-11-15?07:15??UniServer4_1\UniServer\udrive\docs\SRC\logo.bmp
?????文件???????8482??2007-06-04?14:35??UniServer4_1\UniServer\udrive\docs\SRC\pskill.c
?????文件??????75587??2009-04-03?13:07??UniServer4_1\UniServer\udrive\docs\SRC\unicontroller.c
?????文件???????1220??2008-10-11?15:26??UniServer4_1\UniServer\udrive\docs\SRC\unidelay.c
?????文件???????1492??2007-06-04?14:35??UniServer4_1\UniServer\udrive\docs\SRC\uniserv.c
?????文件???????4286??2009-01-18?17:25??UniServer4_1\UniServer\udrive\docs\SRC\uslogo.ico
?????文件???????2203??2009-02-28?07:43??UniServer4_1\UniServer\udrive\home\admin\program\apanel_stop_servers.bat
?????文件???????1216??2009-02-28?07:42??UniServer4_1\UniServer\udrive\home\admin\program\Close.bat
?????文件???????2732??2009-01-21?09:22??UniServer4_1\UniServer\udrive\home\admin\program\get_port.pl
?????文件??????45056??2005-07-06?22:50??UniServer4_1\UniServer\udrive\home\admin\program\pskill.exe
?????文件?????????17??2009-02-21?10:02??UniServer4_1\UniServer\udrive\home\admin\program\unicon.txt
?????文件???????3104??2008-10-11?15:26??UniServer4_1\UniServer\udrive\home\admin\program\unidelay.exe
?????文件???????2560??2004-07-25?14:13??UniServer4_1\UniServer\udrive\home\admin\program\uniserv.exe
............此處省略2109個文件信息
評論
共有 條評論