資源簡介
學生管理系統的代碼,帶注釋的哦
教師端功能
可以更改密碼。
可以添加學生,并要求填寫學生的基本信息。
可以根據學號查詢學生基本信息及其成績。
有權限控制,每個管理員只能管理其所在學院的信息。
可以控制選課的課程范圍,并可以控制選課的時間,即可以控制選課的開始與結束。
可以錄入成績,緩存成績,檢查無誤后公布成績
學生端功能
學生可以查看自己的基本信息。
學生可以查看自己的成績,已修學分和不及格成績信息
學生端可以進行遠程選課,并且可以查看課表。

代碼片段和文件信息
package?wyf.cgq;
import?java.sql.*;
import?java.awt.event.*;
import?javax.swing.*;
public?class?ChangePwd?extends?JPanel?implements?ActionListener
{
/**
?*?pluto
?*/
private?static?final?long?serialVersionUID?=?1L;
private?String?host;?
??//聲明Connection引用、Statement對象引用與結果集引用
private?Connection?conn;
private?Statement?stmt;
private?ResultSet?rs;
//聲明用與表示當前學生學號的引用
private?String?stu_id;
//創建信息提示標簽數組
private?JLabel[]?jlArray={new?JLabel(“原始密碼“)new?JLabel(“新密碼“)new?JLabel(“確認新密碼“)
?????????????????????????};
//創建密碼框數組
private?JPasswordField[]?jpfArray={new?JPasswordField()new?JPasswordField()new?JPasswordField()
?????????????????????????????};
//創建操作按鈕數組
private?JButton[]?jbArray={new?JButton(“確認“)new?JButton(“重置“)
??????????????????????????};
//構造器
public?ChangePwd(String?stu_idString?host)
{
this.host=host;
this.stu_id=stu_id;
//初始化頁面
this.initialframe();
//注冊監聽器
this.addListener();
}
//集體注冊監聽器的方法
public?void?addListener()
{
jpfArray[0].addActionListener(this);
jpfArray[1].addActionListener(this);
jpfArray[2].addActionListener(this);
jbArray[0].addActionListener(this);
jbArray[1].addActionListener(this);
}
//初始化頁面的方法
public?void?initialframe()
{
this.setLayout(null);
for(int?i=0;i {
jlArray[i].setBounds(3020+50*i15030);
this.add(jlArray[i]);
jpfArray[i].setBounds(13020+50*i15030);
this.add(jpfArray[i]);
}
jbArray[0].setBounds(4018010030);
this.add(jbArray[0]);
jbArray[1].setBounds(17018010030);
this.add(jbArray[1]);
}
//實現ActionListener接口中的方法
public?void?actionPerformed(ActionEvent?e)
{
if(e.getSource()==jpfArray[0])
{
jpfArray[1].requestFocus(true);
}
else?if(e.getSource()==jpfArray[1])
{
jpfArray[2].requestFocus(true);
}
else?if(e.getSource()==jpfArray[2])
{
jbArray[0].requestFocus(true);
}
else?if(e.getSource()==jbArray[1])
{//按下重置按鈕的處理代碼
????//將輸入信息清空
for(int?i=0;i {
jpfArray[i].setText(““);
}
}
else?if(e.getSource()==jbArray[0])
{//按下確認按鈕的處理代碼
????//用于判斷密碼格式的正則式字符串
String?patternStr=“[0-9a-zA-Z]{612}“;
//獲取用戶輸入的舊密碼
@SuppressWarnings(“deprecation“)
String?oldPwd=jpfArray[0].getText();
if(oldPwd.equals(““))
{//舊密碼空
JOptionPane.showMessageDialog(this“請輸入原始密碼““錯誤“JOptionPane.ERROR_MESSAGE);
return;
}
//獲取新密碼
//pluto
@SuppressWarnings(“deprecation“)
String?newPwd=jpfArray[1].getText();
if(newPwd.equals(““))
{//新密碼為空
JOptionPane.showMessageDialog(this“請輸入新密碼““錯誤“JOptionPane.ERROR_MESSAGE);
return;
}
if(!newPwd.matches(patternStr))
{//新密碼格式不正確
JOptionPane.showMessageDialog(this“密碼只能是6到12位的字母或數字““錯誤“JOptionPane.ERROR_MESSAGE);
return;
}
//獲取確認密碼
//pluto
@SuppressWarnings(“deprecation“)
String?newPwd1=jpfArray[2].getText();
if(!newPwd.e
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????391??2011-08-17?16:23??ch02\.classpath
?????文件????????382??2011-08-17?10:49??ch02\.project
?????文件????????629??2011-08-17?10:49??ch02\.settings\org.eclipse.jdt.core.prefs
?????文件???????4886??2011-08-22?16:03??ch02\bin\wyf\cgq\ChangePwd.class
?????文件???????5597??2011-08-22?16:03??ch02\bin\wyf\cgq\ChangePwdTeacher.class
?????文件???????7317??2011-08-22?16:03??ch02\bin\wyf\cgq\ChoseCourse.class
?????文件??????12258??2011-08-22?16:16??ch02\bin\wyf\cgq\CourseManage.class
?????文件???????1121??2011-08-22?16:03??ch02\bin\wyf\cgq\CourseTable$TableViewRenderer.class
?????文件???????4699??2011-08-22?16:03??ch02\bin\wyf\cgq\CourseTable.class
?????文件???????4132??2011-08-22?16:03??ch02\bin\wyf\cgq\GetScore.class
?????文件???????3242??2011-08-22?16:03??ch02\bin\wyf\cgq\GetStuInfo.class
?????文件???????3157??2011-08-22?16:03??ch02\bin\wyf\cgq\GradeInDB$TableChangeListener.class
?????文件???????7604??2011-08-22?16:03??ch02\bin\wyf\cgq\GradeInDB.class
?????文件???????7335??2011-08-22?16:03??ch02\bin\wyf\cgq\Login.class
?????文件???????6173??2011-08-22?16:03??ch02\bin\wyf\cgq\NewClass.class
?????文件???????6984??2011-08-22?16:17??ch02\bin\wyf\cgq\NewCourse.class
?????文件??????11911??2011-08-22?16:03??ch02\bin\wyf\cgq\NewStu.class
?????文件???????2474??2011-08-22?16:03??ch02\bin\wyf\cgq\StuClient$1.class
?????文件????????737??2011-08-22?16:03??ch02\bin\wyf\cgq\StuClient$MyNode.class
?????文件???????5878??2011-08-22?16:03??ch02\bin\wyf\cgq\StuClient.class
?????文件???????1688??2011-08-22?16:03??ch02\bin\wyf\cgq\StuFailGrade.class
?????文件???????2180??2011-08-22?16:03??ch02\bin\wyf\cgq\StuGrade.class
?????文件???????2624??2011-08-22?16:03??ch02\bin\wyf\cgq\StuInfo.class
?????文件???????3802??2011-08-22?16:03??ch02\bin\wyf\cgq\StuScore.class
?????文件???????3082??2011-08-22?16:03??ch02\bin\wyf\cgq\TeacherClient$1.class
?????文件????????761??2011-08-22?16:03??ch02\bin\wyf\cgq\TeacherClient$MyNode.class
?????文件???????7021??2011-08-22?16:03??ch02\bin\wyf\cgq\TeacherClient.class
?????文件???????4363??2011-08-22?16:03??ch02\bin\wyf\cgq\TeachSearchInfo.class
?????文件????????763??2011-08-22?16:03??ch02\bin\wyf\cgq\Welcome.class
?????文件???????1045??2008-07-18?10:30??ch02\build\ico.gif
............此處省略69個文件信息
- 上一篇:jsp+mysql火車訂票系統.zip
- 下一篇:jna-4.2.1.jar
評論
共有 條評論