九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

【課程設(shè)計報告】基于JAVA和MySql數(shù)據(jù)庫的CS架構(gòu)學生成績管理系統(tǒng)的設(shè)計與實現(xiàn)

  • 資源ID:28676855       資源大?。?span id="24d9guoke414" class="font-tahoma">334.02KB        全文頁數(shù):26頁
  • 資源格式: DOC        下載積分:15積分
快捷下載 游客一鍵下載
會員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要15積分
郵箱/手機:
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機號,方便查詢和重復(fù)下載(系統(tǒng)自動生成)
支付方式: 支付寶    微信支付   
驗證碼:   換一換

 
賬號:
密碼:
驗證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標題沒有明確說明有答案則都視為沒有答案,請知曉。

【課程設(shè)計報告】基于JAVA和MySql數(shù)據(jù)庫的CS架構(gòu)學生成績管理系統(tǒng)的設(shè)計與實現(xiàn)

更多計算機類課程設(shè)計、畢業(yè)設(shè)計、論文請訪問:上海理工大學計算機學院可視化程序設(shè)計報告(2010 2011 年度第2學期)題 目 學生成績管理系統(tǒng) 院 系 專 業(yè) 電子商務(wù) 年 級 2009級 學 號 姓 名 指 導(dǎo) 教 師 成 績 _2011 年 03月 09日 目 錄一、課程設(shè)計的目的與要求2二、 設(shè)計的正文 21.系統(tǒng)分析21.1系統(tǒng)開發(fā)背景等 21.2業(yè)務(wù)流程分析 21.3數(shù)據(jù)流程圖 32.系統(tǒng)設(shè)計 3 2.1功能設(shè)計 3 2.2系統(tǒng)運行環(huán)境與數(shù)據(jù)庫設(shè)計 4 2.3輸入/輸出設(shè)計43.系統(tǒng)實施4 3.1登錄與退出界面 4 3.2 修改密碼10 3.3成績查詢153.4 相關(guān)數(shù)據(jù)庫表24三、課程設(shè)計總結(jié)25四、參考文獻26 學生成績查詢系統(tǒng)一、課程設(shè)計的目的與要求通過面向?qū)ο蟪绦蛟O(shè)計課程設(shè)計,進一步掌握面向?qū)ο蟪绦蛟O(shè)計的理論和方法。培養(yǎng)和鍛煉開發(fā)小型學生成績查詢系統(tǒng)的能力。為今后相關(guān)系統(tǒng)開發(fā)打下良好的基礎(chǔ)。要求了學生成績查詢系統(tǒng)開發(fā)的全過程,理解面向?qū)ο蟪绦蛟O(shè)計課程相關(guān)的概念,掌握面向?qū)ο蟪绦蛟O(shè)計的開發(fā)方法,鞏固對Java相關(guān)方法和概論的理解。主要包括:系統(tǒng)調(diào)研方法;業(yè)務(wù)分析、數(shù)據(jù)分析、系統(tǒng)邏輯模型設(shè)計方法;數(shù)據(jù)庫設(shè)計、功能設(shè)計、物理模型設(shè)計方法;系統(tǒng)的實現(xiàn)等方法。完成一個小型系統(tǒng)的設(shè)計與開發(fā)。二、設(shè)計正文1 系統(tǒng)分析1.1系統(tǒng)開發(fā)背景、開發(fā)范圍、建設(shè)目標與必要性隨著國家對于教育的重視逐漸加大,學校正向著大型化、規(guī)?;l(fā)展,而對于大中型學校,跟學生信息管理有關(guān)的信息隨之急劇增加。在這種情況下單靠人工來處理員工的工資不但顯得力不從心,而且極容易出錯。該系統(tǒng)就是設(shè)計一個學生信息數(shù)據(jù)庫管理系統(tǒng),由計算機代替人工執(zhí)行一系列諸如增加新學生,刪除舊學生,學生信息修改,查詢,維護及打印等操作。這樣就使學生部門管理人員可以輕松快捷地完成學生信息管理的任務(wù)。1>本課題的研究意義當今時代是飛速發(fā)展的信息時代。在各行各業(yè)中離不開信息處理,這正是計算機被廣泛應(yīng)用于信息管理系統(tǒng)的環(huán)境。計算機的最大好處在于利用它能夠進行信息管理。使用計算機進行信息控制,不僅提高了工作效率,而且大大的提高了其安全性。尤其對于復(fù)雜的信息管理,計算機能夠充分發(fā)揮它的優(yōu)越性。2>本課題的研究現(xiàn)狀管理查詢信息系統(tǒng)是進行信息的采集、存儲、查詢、加工、維護和使用的系統(tǒng)。它是隨著管理科學和技術(shù)科學的發(fā)展而形成的。學生成績管理查詢系統(tǒng)是一個教育單位不可缺少的部分,它的內(nèi)容對于學校的決策者和管理者和學生來說都至關(guān)重要,所以學生成績管理查詢系統(tǒng)應(yīng)該能夠為用戶提供充足的信息和快捷的查詢手段,但一直以來人們使用傳統(tǒng)人工的方式管理文件檔案,這種管理方式存在著許多缺點,如:效率低、保密性差;另外時間一長,將產(chǎn)生大量的文件和數(shù)據(jù),這對于查找、更新和維護都帶來了不少的困難。1.2業(yè)務(wù)流程分析主要業(yè)務(wù)流程圖,如下圖所示 1.3數(shù)據(jù)流程圖 2 系統(tǒng)設(shè)計2.1功能設(shè)計學生信息管理系統(tǒng)主要提供方便高效的查詢功能,學生可以通過該系統(tǒng)查詢相關(guān)信息。對于本系統(tǒng),我們需要實現(xiàn)以下一些基本功能:1)密碼管理功能該模塊實現(xiàn)對用戶密碼進行管理的功能,主要是進行密碼的修改。為了防止個人的名片信息被泄露,不知道用戶密碼的人員不能進入本系統(tǒng)。出于安全的考慮,用戶可以定期修改自己的密碼,以防止密碼被盜用。2)成績管理功能該模塊實現(xiàn)成績查詢功能。用戶在查詢學生成績時,有時需要了解學生的基本信息,因此希望在查詢出的內(nèi)容中包括學生基本情況和成績信息。有時用戶需要查詢學生的某些課程成績,因此應(yīng)該具有查詢課程成績的功能。有時需要查詢學生的學期總成績,因此也應(yīng)該具有該功能。3)退出系統(tǒng)完成了對學生成績的查詢的操作后,應(yīng)該可以安全地離開該系統(tǒng)。通過該模塊實現(xiàn)安全退出大學生成績查詢系統(tǒng)。2.2系統(tǒng)運行環(huán)境與數(shù)據(jù)庫設(shè)計鑒于本系統(tǒng)的業(yè)務(wù)性質(zhì),必須選擇具有較高的可靠性、穩(wěn)定性和必要的容錯能力的計算機硬件和軟件系統(tǒng),以保證任何情況下都不至于丟失、損壞數(shù)據(jù);必須具有較高的響應(yīng)速度,以保證各項具體業(yè)務(wù)的順利進行;應(yīng)考慮具有良好的可維護性,可操作性和可擴充性,以保證將來系統(tǒng)規(guī)模的擴展和升級的需要。開發(fā)與運行環(huán)境的使用開發(fā)前臺工具:JAVA開發(fā)后臺工具:MySQL本系統(tǒng)采用Microsoft Windows 2000Server作為操作系統(tǒng)。本系統(tǒng)準備采用客戶機/服務(wù)器(C/S)結(jié)構(gòu)模式。2.3輸入/輸出設(shè)計格式說明:學生成績輸入界面格式為對話框格式,可是選項為:學生學號、姓名、班級、各科目成績。輸出單個學生成績也是對話框形式,全部學生成績輸出為表格形式。安全性設(shè)計:設(shè)置了用戶名和密碼驗證方式,防止用戶非法登錄。3 系統(tǒng)實施3.1登錄與退出界面登錄界面:退出界面關(guān)鍵代碼如下,public class Login extends JFrame implements ActionListener, FocusListener,KeyListener, ItemListener /* * */private static final long serialVersionUID = 1L;JLabel top, bott;JPanel panelMain, panelInfo;JTextField userName;JPasswordField password;JButton login, cancel;String culeString = " 提 示 : "public Login() super("重慶大學城市科技學院2008級電子商務(wù)-學生成績管理系統(tǒng)");top = new JLabel(new ImageIcon("picture/login_top.gif");bott = new JLabel();panelMain = new JPanel(new BorderLayout(10, 10);bott.setBorder(new LineBorder(new Color(184, 173, 151);buildCenter();panelMain.add("North", top);panelMain.add("South", bott);panelMain.add(panelInfo);/ 加監(jiān)聽事件login.addActionListener(this);cancel.addActionListener(this);login.addFocusListener(this);cancel.addFocusListener(this);login.addKeyListener(this);cancel.addKeyListener(this);userName.addFocusListener(this);userName.addKeyListener(this);password.addFocusListener(this);password.addKeyListener(this);/ 加窗口監(jiān)聽,new WindowAdapter適配器this.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent we) quit();/ End windowClosing);this.setContentPane(panelMain); / 設(shè)置窗口面板this.setLocation(400, 335);this.setSize(350, 250);this.setResizable(false); / 設(shè)置窗口大小不可變this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);/ /*/this.setVisible(true);password.requestFocus(true); / 設(shè)置焦點給密碼框private void buildCenter() / TODO Auto-generated method stubJLabel lb1, lb2;lb1 = new JLabel("用戶名:");lb2 = new JLabel("密 碼:");userName = new JTextField(15);password = new JPasswordField(15);login = new TJButton("picture/key.gif", "登 錄", "登錄系統(tǒng)");cancel = new TJButton("picture/exit.gif", "退 出", "關(guān)閉系統(tǒng)");/ */ 定義面板為無布局panelInfo = new JPanel(null);/ 加入組建panelInfo.add(lb1);panelInfo.add(lb2);panelInfo.add(userName);panelInfo.add(password);panelInfo.add(login);panelInfo.add(cancel);lb1.setBounds(70, 14, 60, 25);lb2.setBounds(70, 48, 60, 25);userName.setBounds(150, 14, 150, 25);password.setBounds(150, 48, 150, 25);login.setBounds(80, 100, 80, 23);cancel.setBounds(195, 100, 80, 23);/ 設(shè)置邊框線panelInfo.setBorder(BorderFactory.createTitledBorder("");private void quit() int flag = 0;String msg = "您 現(xiàn) 在 要 關(guān) 閉 系 統(tǒng) 嗎?"flag = JOptionPane.showConfirmDialog(null, msg, "提示",JOptionPane.YES_NO_OPTION);if (flag = JOptionPane.YES_OPTION) this.setVisible(false);System.exit(0);return;private void dengLu() String username = userName.getText().trim();/ System.out.println(user);String pwd = String.valueOf(password.getPassword();String sql = "select password from userinfo where username="+ username + ""ResultSet rs = ConnectionDB.verification(sql); / 從數(shù)據(jù)庫獲取匹配user的密碼結(jié)果集int flag = 0; / 用戶登錄錯誤次數(shù)的標記try while (rs.next() / 用戶名存在if (pwd.equals(rs.getString(1) bott.setText(culeString + "登錄成功,正在進入系統(tǒng).");SaveUserInfo user = new SaveUserInfo();/ 保存用戶名user.setUsername(username);user.setPassword(pwd);new RegisterUI();this.setVisible(false); else bott.setText(culeString + "用戶名/密碼不正確,請重新輸入.");int m = JOptionPane.showConfirmDialog(null,"用戶名/密碼錯誤,請重新輸入!", "錯誤信息", JOptionPane.YES_OPTION);if (m = JOptionPane.NO_OPTION) System.exit(1); else flag+;if (flag = 3) JOptionPane.showMessageDialog(null,"您不是本系統(tǒng)的用戶,系統(tǒng)關(guān)閉 .", "警告",JOptionPane.ERROR_MESSAGE);System.exit(0);/在Login.java這個頁面里面點擊鼠標右鍵,run as ->Java Application就OK了明白了/還有一種方法,上面喲uge綠的圓形圖標,那個下拉菜單有需要運行的類名稱,需要運行哪個就點一下哦/程序要改一下 =return; catch (HeadlessException e) / TODO Auto-generated catch blocke.printStackTrace(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();public void actionPerformed(ActionEvent ae) / 動作按鍵if (ae.getSource() = login) dengLu(); / 登錄 else quit(); / 退出public void itemStateChanged(ItemEvent ie) password.requestFocus(true);public void keyListener(KeyEvent ke) / 鍵盤按下監(jiān)聽int key = ke.getKeyCode();if (key = ke.VK_ENTER) if (ke.getSource() = userName) password.requestFocus(true); / 按下Enter鍵后,焦點從用戶名框轉(zhuǎn)到密碼框 else if (password.getPassword().length > 0) dengLu(); / 按Enter鍵登錄系統(tǒng) else if (key = ke.VK_ESCAPE) quit(); / 按ESC鍵退出系統(tǒng)public void keyReleased(KeyEvent ke) / 鍵盤釋放監(jiān)聽public void keyTyped(KeyEvent ke) / 按鍵類型監(jiān)聽public void focusGained(FocusEvent fe) if (fe.getSource() = userName) / 窗口下面的功能提示bott.setText(culeString + "請輸入用戶名."); else if (fe.getSource() = password) bott.setText(culeString + "請輸入登錄密碼."); else if (fe.getSource() = login) bott.setText(culeString + "登錄系統(tǒng)."); else if (fe.getSource() = cancel) bott.setText(culeString + "退出系統(tǒng).");public void focusLost(FocusEvent fe) / 失去焦點監(jiān)聽 */public static void main(String args) new FStartWindow("picture/Login.gif", new JFrame(), 1200);new Login();public void keyPressed(KeyEvent e) / TODO Auto-generated method stub3.2修改密碼修改密碼:學生輸入正確的用戶名和密碼后可以對自己的密碼進行修改。管理員也可以登錄系統(tǒng)后,進入用戶管理模塊,點擊修改用戶密碼,輸入原始密碼,新密碼和確認密碼,如果原始密碼輸入錯誤系統(tǒng)將提示密碼錯誤,新密碼和確認密碼必須是一樣的這樣才能修改成功。private static final long serialVersionUID = 1L;String username = SaveUserInfo.getUsername();String password = SaveUserInfo.getPassword();JButton bt1, bt2;JTextField tf1, tf2, tf3, tf;JPanel panelMain;public RePassword (JFrame frame) super(frame, "修改密碼", true);panelMain = new JPanel(new BorderLayout();BuildPanel();Addlistener();this.setContentPane(panelMain);this.setSize(350, 200);this.setMaximumSize(new Dimension(500, 500);this.setResizable(false);this.setLocation(450, 350);this.setVisible(true);private void Addlistener() / TODO Auto-generated method stubbt1.addActionListener(this);bt2.addActionListener(this);bt1.addMouseListener(this);bt2.addMouseListener(this);tf1.addActionListener(this);tf2.addActionListener(this);private void BuildPanel() / TODO Auto-generated method stubJLabel pass1, pass2, pass3;pass1 = new JLabel("原密碼:");pass2 = new JLabel("新密碼:");pass3 = new JLabel("重復(fù)新密碼:");/文本框tf1 = new JTextField(15);tf2 = new JTextField(15);tf3 = new JTextField(15);tf = new JTextField("密碼信息");tf.setHorizontalAlignment (JTextField.CENTER);tf.setBackground(new Color(199, 183, 143);tf.setBorder(new LineBorder(new Color(87, 87, 47);tf.setEditable(false);/按鈕bt1 = new TJButton("picture/modi3.gif", "確定", "修改密碼");bt2 = new TJButton("picture/cancel.gif", "取消", "取消操作");JPanel ps, pc, pcc, pcc1, pcc11, pcc12;/JLabel line0 = new JLabel(new ImageIcon("pic/line5.gif");/分隔線/JLabel line1 = new JLabel(new ImageIcon("pic/line4.gif");/分隔線ps = new JPanel(new FlowLayout(FlowLayout.CENTER,50,10); /放置確定和取消按鈕pc = new JPanel(new BorderLayout(0,5); /放置按鈕以上的部分pcc = new JPanel(new FlowLayout(FlowLayout.CENTER,0,0); /添加新用戶文本框為不可編輯,放在North,其他放在流布局的面板中pcc1 = new JPanel(new FlowLayout(FlowLayout.LEFT,0,3); /放置"密碼信息"三行pcc11 = new JPanel(new GridLayout(3,1,0,6);/放置密碼信息"三行pcc12 = new JPanel(new GridLayout(3,1,0,6);/放置密碼信息"三行文本框/構(gòu)造密碼信息"三行pcc11.add(pass1);pcc11.add(pass2);pcc11.add(pass3);pcc12.add(tf1);pcc12.add(tf2);pcc12.add(tf3);pcc1.add(pcc11);pcc1.add(pcc12);/將用戶信息加入面板pcc.add(pcc1);pc.add("North",tf);pc.add(pcc);pc.setBorder(BorderFactory.createTitledBorder("");ps.add(bt1);ps.add(bt2);panelMain.add("South",ps);panelMain.add(pc);/*=* *# private boolean isValidity() : 測試用戶輸入的數(shù)據(jù)是否合法 *參數(shù) :無 *返回值 :boolean *修飾符 :private *功能 :測試用戶輸入的數(shù)據(jù)是否合法 *=* */private boolean isValidity() if(tf1.getText().length() = 0) JOptionPane.showMessageDialog(null, "原密碼不能為空", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else if(tf2.getText().length() = 0) JOptionPane.showMessageDialog(null, "新密碼不能為空", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else if(tf3.getText().length() = 0) JOptionPane.showMessageDialog(null, "重復(fù)密碼不能為空", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else if(tf2.getText().length() != tf3.getText().length() JOptionPane.showMessageDialog(null, "新密碼和重復(fù)密碼不一致不能為空", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else if(tf1.getText().toString() != password) JOptionPane.showMessageDialog(null, "您輸入的原密碼不正確", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else if(tf2.getText().length() > 16) JOptionPane.showMessageDialog(null, "密碼長度不能超過16位", "提示", JOptionPane.INFORMATION_MESSAGE);tf1.requestFocus(true);return false; else password = tf2.getText();return true;/*=* *# private void saveLiveIn() : *參數(shù) :無 *返回值 :無 *修飾符 :private *功能 :保存用戶信息 *=* * throws SQLException */private boolean rePassword() throws SQLException boolean flag = ConnectionDB.rePassword(username, password);return flag;/*=* *ActionListener 監(jiān)聽 *=* */public void actionPerformed (ActionEvent e) String msg = "密碼修改成功!請返回."if (e.getSource() = bt1) if (isValidity() try boolean flag = rePassword(); catch (SQLException e1) / TODO Auto-generated catch blocke1.printStackTrace();JOptionPane.showMessageDialog(null, msg, "提示", JOptionPane.YES_OPTION);else if(e.getSource() = bt2) this.setVisible(false);public void mouseClicked(MouseEvent e) / TODO Auto-generated method stubpublic void mouseEntered(MouseEvent e) / TODO Auto-generated method stubpublic void mouseExited(MouseEvent e) / TODO Auto-generated method stubpublic void mousePressed(MouseEvent e) / TODO Auto-generated method stubpublic void mouseReleased(MouseEvent e) / TODO Auto-generated method stub3.3成績查詢public class ConnectionDB private static Connection conn = null;private static Statement stmt = null;private static ResultSet rs = null;static try Class.forName("com.mysql.jdbc.Driver").newInstance();conn = DriverManager.getConnection("jdbc:mysql:/localhost:3306/stu", "root", "root"); catch (Exception e) JOptionPane.showMessageDialog(null, "數(shù)據(jù)庫連接失敗.", "錯誤",JOptionPane.ERROR_MESSAGE);System.exit(0);private ConnectionDB() / 防止實例化public static ResultSet verification(String sql) try stmt = conn.createStatement();rs = stmt.executeQuery(sql);/ stmt.close();/ conn.close(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();return rs;/根據(jù)用戶名獲取密碼信息public String getPassword(String username) String password = null;try stmt = conn.createStatement();rs = stmt.executeQuery("select password from userinfo where username = "+ username + "");while (rs.next() password = rs.getString("password");rs.close();stmt.close();conn.close(); catch (SQLException e) / TODO Auto-generated catch blockSystem.out.println("ConnectionDB.insertAmount(): false");return password;/更新數(shù)據(jù)庫中的密碼信息public static boolean rePassword(String username, String password) boolean flag = false; / 作為是否成功插入記錄的標記int rsBefore = 0;try stmt = conn.createStatement();rsBefore = stmt.executeUpdate("UPDATE userinfo SET password = "+ password + " where username = " + username + "");stmt.close();conn.close(); catch (SQLException e) / TODO Auto-generated catch blockSystem.out.println("ConnectionDB.insertAmount(): false");if (rsBefore > 0)flag = true;return flag;/根據(jù)學號獲取此學生的各科成績,返回值為String數(shù)組,保存形式為課程名+分數(shù)public static String getGrade(String stuid) String sql = "select b.coursename, a.grade FROM gradeinfo a,courseinfo b where a.stuid="+ stuid + " and a.courseid=b.courseid"String str = null;int count = 0;try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() / GradeInfo info = new GradeInfo();/ info.setCourseName(rs.getString("coursename");/ info.setScore(rs.getString("grade");/ list.add(info);count+;str = new Stringcount;rs.beforeFirst();int i = 0;while (rs.next() stri+ = rs.getString("coursename") + "."+ rs.getString("grade");rs.close();stmt.close(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != null && str.length > 0)return str;return null;/根據(jù)學號獲取學生姓名(寫重復(fù)了 。見getName方法)public static String getName(String stuid) String sql = "select name from stuinfo where stuid=" + stuid + ""String str = null;try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() str = rs.getString("name");rs.close();stmt.close(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != null)return str;return null;/根據(jù)學號獲取此學號的平均成績public static String getAvg(String stuid) String sql = "select avg(grade) as avg from gradeinfo where stuid="+ stuid + ""/cast(avg(colname) as decimal(9,1) endString str = null;try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() str = rs.getString("avg");rs.close();stmt.close(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != null)return str;return null;/獲取所有學生的平均成績public static String getAllAvg() String sql = "select a.stuid, name, avg(grade) avg "+ "from gradeinfo a, courseinfo b, stuinfo c "+ "where a.stuid=c.stuid and a.courseid=b.courseid "+ "GROUP by stuid"String str = null;int count = 0;try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() count+;rs.beforeFirst();str = new Stringcount;int i = 0;while (rs.next() stri+ = rs.getString("stuid") + "." + rs.getString("name")+ "." + rs.getString("avg");rs.close();stmt.close(); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != null && str.length > 0)return str;return null;/獲取所有課程信息(課程名)public static String getCourseName() String sql = "select coursename from courseinfo"String str = ""try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() if (!rs.isLast() str += rs.getString("coursename") + "." else str += rs.getString("coursename"); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != null)return str;return null;/根據(jù)學號獲取學生姓名public static String getNameByStuid(String stuid) String sql = "select name from stuinfo where stuid=" + stuid + ""String str = null;try stmt = conn.createStatement();rs = stmt.executeQuery(sql);while (rs.next() str = rs.getString("name"); catch (SQLException e) / TODO Auto-generated catch blocke.printStackTrace();if (str != nu

注意事項

本文(【課程設(shè)計報告】基于JAVA和MySql數(shù)據(jù)庫的CS架構(gòu)學生成績管理系統(tǒng)的設(shè)計與實現(xiàn))為本站會員(仙***)主動上傳,裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng)(點擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因為網(wǎng)速或其他原因下載失敗請重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!