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

《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告

上傳人:仙*** 文檔編號:28332328 上傳時(shí)間:2021-08-26 格式:DOC 頁數(shù):21 大?。?68.51KB
收藏 版權(quán)申訴 舉報(bào) 下載
《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告_第1頁
第1頁 / 共21頁
《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告_第2頁
第2頁 / 共21頁
《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告_第3頁
第3頁 / 共21頁

下載文檔到電腦,查找使用更方便

15 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告》由會(huì)員分享,可在線閱讀,更多相關(guān)《《java程序設(shè)計(jì)》學(xué)生管理系統(tǒng)報(bào)告(21頁珍藏版)》請?jiān)谘b配圖網(wǎng)上搜索。

1、精品文檔 好文檔 Java程序設(shè)計(jì)結(jié)課報(bào)告課程名稱 JAVA程序設(shè)計(jì) 設(shè)計(jì)題目 學(xué)生信息管理系統(tǒng) 專業(yè)班級 信科101班 學(xué) 號 09 學(xué)生姓名 XX 教 師 彭 潔 信息工程系精品文檔 好文檔目 錄目 錄II第1章 系統(tǒng)簡介31.1 系統(tǒng)功能31.2 系統(tǒng)引用例子3第2章 表的設(shè)計(jì)42.1 系統(tǒng)數(shù)據(jù)庫表結(jié)構(gòu)4第3章 連接數(shù)據(jù)庫的實(shí)現(xiàn)53.1 SQL Server數(shù)據(jù)庫連接的關(guān)鍵代碼5第4章 系統(tǒng)詳細(xì)設(shè)計(jì)64.1系統(tǒng)登錄模塊設(shè)計(jì)64.2 系統(tǒng)主界面詳細(xì)設(shè)計(jì)94.3 學(xué)生信息增刪改模塊設(shè)計(jì)104.4 學(xué)生信息查詢模塊設(shè)計(jì)124.5 注冊子管理員模塊設(shè)計(jì)15答辯記錄20成績考核表20精品文檔 好文

2、檔學(xué)生信息管理系統(tǒng)第1章 系統(tǒng)簡介1.1 系統(tǒng)功能本系統(tǒng)主要功能:1) 通過數(shù)據(jù)校驗(yàn)如果數(shù)據(jù)校驗(yàn)成功,顯示主界面;2)登入后查詢所有學(xué)生信息;3)窗體實(shí)現(xiàn)對學(xué)生信息的增加、刪除、修改;4)模糊查詢,根據(jù)姓名或者一個(gè)字查詢;5)實(shí)現(xiàn)子管理員的注冊,并且寫入注冊信息到記事本,并實(shí)現(xiàn)可以用新注冊的管理賬號登入系統(tǒng)主界面1.2 系統(tǒng)引用例子課本P275頁 15.5和課本P386頁 21.6第2章 表的設(shè)計(jì)2.1 系統(tǒng)數(shù)據(jù)庫表結(jié)構(gòu)將系統(tǒng)數(shù)據(jù)庫表結(jié)構(gòu)用表的形式畫出,如:字段名字段類型長度主/外鍵字段值約束對應(yīng)中文名SNOInt10PNot null學(xué)生編號SNAMEVarchar20Not null學(xué)生名

3、字SSEXVarchar 1Not null學(xué)生性別表2.1 用戶表(JBXX)SAGEInt2Not null學(xué)生年齡字段名字段類型長度主/外鍵字段值約束對應(yīng)中文名SNOInt10PNot null學(xué)生編號JNAMEVarchar20Not null家長名字JTELInt 10Not null家庭電話表2.2 家庭信息表(JTXX)注冊子管理員的記事本1111.TXT內(nèi)信息如下:yyyy#yyyylinlin#linlinadmin1#1111admin2#2222admin3#3333admin4#4444opop#opopuuuu#uuuubbbb#bbbbtttt#tttt第3章 連接

4、數(shù)據(jù)庫的實(shí)現(xiàn)3.1 SQL Server數(shù)據(jù)庫連接的關(guān)鍵代碼public class DButil Connection con = null;String name = linqun;String passname = linqun;String ul1 = jdbc:oracle:thin:127.0.0.1:1521:orcl;public Connection getconn() try Class.forName(oracle.jdbc.driver.OracleDriver);System.out.println(數(shù)據(jù)庫驅(qū)動(dòng)加載成功);con = DriverManager.get

5、Connection(ul1, name, passname);System.out.println(數(shù)據(jù)庫連接成功); catch (Exception e) System.out.println(e);return con;public void dbclose(Connection conn, Statement sta, ResultSet rs) try if (rs != null)rs.close();if (conn != null)conn.close();if (sta != null)sta.close(); catch (Exception e) e.printStac

6、kTrace();finallySystem.out.println(數(shù)據(jù)庫釋放!);第4章 系統(tǒng)詳細(xì)設(shè)計(jì)4.1 系統(tǒng)登錄模塊設(shè)計(jì)4.1.1、運(yùn)行效果圖圖 4.1 登錄主界面效果圖4.1.2、主要代碼public class login extends JDialog static PreparedStatement SQL;private static final long serialVersionUID = 1L;private JLabel l_Id = new JLabel(登陸賬戶, JLabel.CENTER);private JLabel l_pw = new JLabel(登

7、陸密碼, JLabel.CENTER);private JTextField t_Id = new JTextField(10);private JPasswordField t_pw = new JPasswordField(10);private JButton btnLogin;private JButton btnAdd;private JButton btnClose;int num = 3;public login() super();Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();this.se

8、tLocation(screenSize.width - 300) / 2,(screenSize.height - 200) / 2);this.setResizable(false);getContentPane().setBackground(new Color(225, 225, 225);getContentPane().setLayout(null);initialize();protected void initialize() setTitle(系統(tǒng)登錄);l_Id.setBounds(48, 43, 53, 25);t_Id.setBounds(110, 43, 150, 2

9、5);l_pw.setBounds(48, 93, 53, 25);t_pw.setBounds(110, 93, 150, 25);getContentPane().add(l_Id);getContentPane().add(l_pw);getContentPane().add(t_Id);getContentPane().add(t_pw);btnLogin = new JButton();btnLogin.setText(登 錄);btnLogin.setBounds(20, 142, 85, 28);btnLogin.setBackground(new Color(244, 243,

10、 239);btnLogin.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) addBtnLoginActionListener(););getContentPane().add(btnLogin);btnAdd = new JButton();btnAdd.setText(注冊);btnAdd.setBounds(105, 142, 85, 28);btnAdd.addActionListener(new ActionListener() public void actionP

11、erformed(ActionEvent e) addNew zc = new addNew();setVisible(false);zc.setVisible(true););getContentPane().add(btnAdd);btnClose = new JButton();btnClose.setText(關(guān) 閉);btnClose.setBounds(190, 142, 85, 28);btnClose.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) dispose

12、();System.exit(-1););getContentPane().add(btnClose);private void addBtnLoginActionListener() String id = t_Id.getText();String password = new String(t_pw.getPassword();if (id.equals() JOptionPane.showMessageDialog(this, 帳號不可為空, 提示,JOptionPane.WARNING_MESSAGE);return; else if (password.equals() JOpti

13、onPane.showMessageDialog(this, 密碼不可為空, 提示,JOptionPane.WARNING_MESSAGE);return; else tools t = new tools();boolean success = false; / TODO:數(shù)據(jù)校驗(yàn)success = t.eqes(id, password);if (success) / 如果數(shù)據(jù)校驗(yàn)成功 顯示主界面JOptionPane.showMessageDialog(this, 成功登錄, 提示,JOptionPane.INFORMATION_MESSAGE);new mainView();this.

14、dispose(); else -num;if (num = 0) JOptionPane.showMessageDialog(this, 用戶名或者密碼錯(cuò)誤!您沒有機(jī)會(huì)了);System.exit(0); else JOptionPane.showMessageDialog(this, 用戶名或者密碼錯(cuò)誤!您還有 + num+ 次機(jī)會(huì));public Dimension getPreferredSize() return new Dimension(320, 170);public void show() Toolkit tk = Toolkit.getDefaultToolkit();Di

15、mension screen = tk.getScreenSize();Dimension d = getSize();this.setLocation(screen.width - d.width) / 2,(screen.height - d.height) / 2);/ 輸入密碼后回車相當(dāng)于點(diǎn)擊了登錄按鈕getRootPane().setDefaultButton(btnLogin);t_pw.requestFocus();setDefaultCloseOperation(DISPOSE_ON_CLOSE);setSize(300, 220);super.show();public st

16、atic void main(String args) DButil util = new DButil();util.getconn();login loginFrame = new login();loginFrame.setVisible(true);4.2 系統(tǒng)主界面詳細(xì)設(shè)計(jì)4.2.1、運(yùn)行效果圖圖 4.2 登錄后系統(tǒng)界面效果圖4.2.2、主要代碼public mainView() super();setTitle(所有學(xué)生信息);setBounds(350, 150, 700, 400);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);s

17、etVisible(true);final JScrollPane scrollPane = new JScrollPane();con = db.getconn();Vector tableValueV, columnNameV;/ 存放列名columnNameV = new Vector();columnNameV.add(學(xué)號);columnNameV.add(名字);columnNameV.add(性別);columnNameV.add(年齡);tableValueV = new Vector();scrollPane.setViewportView(table);final JPan

18、el panel = new JPanel();getContentPane().add(panel, BorderLayout.SOUTH);panel.add(new JLabel(編號:);aTextField = new JTextField(, 5);panel.add(aTextField);panel.add(new JLabel(姓名:);bTextField = new JTextField(, 5);panel.add(bTextField);panel.add(new JLabel(性別:);cTextField = new JTextField(, 5);panel.a

19、dd(cTextField);panel.add(new JLabel(年齡:);dTextField = new JTextField(, 5);panel.add(dTextField);4.3 學(xué)生信息增刪改模塊設(shè)計(jì)4.3.1、增加信息(121,白娘子,M,22)后運(yùn)行效果圖如下:圖 4.3 增加一個(gè)記錄效果圖4.3.2、主要代碼final JButton addButton = new JButton(添加);addButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent

20、e) userDao add = new userDaoImpl();user u = new user();u.setSno(Integer.parseInt(aTextField.getText();u.setsName(bTextField.getText();u.setSsex(cTextField.getText();u.setSage(Integer.parseInt(dTextField.getText();add.addUser(u);setVisible(false);new mainView(););panel.add(addButton);4.3.3、刪除信息編號為120

21、的學(xué)生信息后結(jié)果如下:圖 4.4 刪除一個(gè)記錄效果圖4.3.4、主要代碼:final JButton delButton = new JButton(刪除);delButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) userDao del = new userDaoImpl();user ud = new user();int selectedRow = table.getSelectedRow();/ 獲得被選中行的索引if (selectedRow != -1)/

22、判斷是否存在被選中行del.deleUser(Integer.parseInt(aTextField.getText();setVisible(false);tableModel.removeRow(selectedRow););panel.add(delButton);4.3.5、修改信息(105,關(guān)美眉,F(xiàn),41)為(105,關(guān)大俠,M,30)后運(yùn)行效果圖如下:圖 4.5 修改一個(gè)記錄效果圖4.3.6、主要代碼:panel.add(searchButton);final JButton updButton = new JButton(修改);updButton.addActionListe

23、ner(new ActionListener() public void actionPerformed(ActionEvent e) userDao update = new userDaoImpl();user upe = new user();aTextField.setEditable(false);int selectedRow = table.getSelectedRow();/ 獲得被選中行的索引if (selectedRow != -1) / 判斷是否存在被選中行upe.setSno(Integer.parseInt(aTextField.getText();upe.setsN

24、ame(bTextField.getText();upe.setSsex(cTextField.getText();upe.setSage(Integer.parseInt(dTextField.getText();update.updateUser(upe);setVisible(false);new mainView(););panel.add(updButton);4.4 學(xué)生信息查詢模塊設(shè)計(jì)4.4.1、運(yùn)行效果圖圖 4.6 查詢記錄集效果圖查詢姓趙的人信息:圖 4.7 查詢結(jié)果圖查詢名字帶“山”的人信息:圖 4.8 查詢結(jié)果圖4.4.2、主要代碼:public search() set

25、Title(根據(jù)姓名查詢學(xué)生信息);setLayout(new BorderLayout();setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);validate();setBounds(350, 150, 650, 400);final JPanel pane = new JPanel();jl=new JLabel(輸入姓或者名查詢);TextField = new JTextField(, 5);jb1 = new JButton(查詢);jb2 = new JButton(返回);pane.add(jl);pane.add(TextField)

26、;pane.add(jb1);pane.add(jb2);getContentPane().add(pane, BorderLayout.NORTH);jb1.addActionListener(this);jb2.addActionListener(this);setVisible(true);public void actionPerformed(ActionEvent e) if (e.getActionCommand().equals(查詢) JScrollPane jsp = new JScrollPane();Vector tableValueV,columnNameV;colum

27、nNameV = new Vector();columnNameV.add(學(xué)號);columnNameV.add(名字);columnNameV.add(性別);columnNameV.add(年齡);tableValueV = new Vector();userDao user = new userDaoImpl();user u = user.searchByName(TextField.getText();Vector rowV = new Vector();rowV.add(u.getSno();rowV.add(u.getsName();rowV.add(u.getSsex();r

28、owV.add(u.getSage();tableValueV.add(rowV);tableModel= new DefaultTableModel(tableValueV, columnNameV);table = new JTable(tableModel);jsp = new JScrollPane(table);jsp.setViewportView(table);getContentPane().add(jsp, BorderLayout.CENTER);setVisible(true);if (e.getActionCommand().equals(返回) new mainVie

29、w();4.5 注冊子管理員模塊設(shè)計(jì)4.5.1、運(yùn)行效果圖圖 4.9 注冊子管理員效果圖4.5.2、主要代碼:public addNew() setDefaultCloseOperation(EXIT_ON_CLOSE);load();this.setVisible(true);Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();this.setLocation(screenSize.width - 300) / 2,(screenSize.height - 200) / 2);this.setResizable

30、(false);this.setTitle(注冊子管理員界面);this.setVisible(true);this.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) System.exit(0););public void load() Pane = (JPanel) getContentPane();Pane.setLayout(null);setSize(new Dimension(410, 300);setTitle(管理員登入界面);t1.setBounds(70, 50, 1

31、00, 30);t2.setBounds(70, 80, 100, 30);t3.setBounds(70, 110, 100, 30);t4.setBounds(250, 50, 100, 30);t5.setBounds(250, 80, 100, 30);f1.setBounds(150, 50, 100, 20);f2.setBounds(150, 80, 100, 20);f3.setBounds(150, 110, 100, 20);b1.setFont(new java.awt.Font(Botton, Font.BOLD, 12);b1.setBounds(120, 140,

32、60, 50);b2.setFont(new java.awt.Font(Dialog, Font.BOLD, 12);b2.setBounds(200, 140, 60, 50);Pane.add(t1);Pane.add(t2);Pane.add(t3);Pane.add(t4);Pane.add(t5);Pane.add(f1);Pane.add(f2);Pane.add(f3);Pane.add(b1);Pane.add(b2);b1.addActionListener(this);b2.addActionListener(this);4.5.3、當(dāng)注冊名已經(jīng)存在時(shí)效果如下:圖 4.1

33、0 驗(yàn)證注冊界面4.5.4、成功注冊時(shí)效果如下:(用戶名:qunqun;密碼:qunqun)圖 4.11 注冊成功界面4.5.5、主要代碼public void actionPerformed(ActionEvent e) if (e.getActionCommand().equals(注冊) if (tools.indes(f1.getText() & tools.indes(f2.getText() if (tools.eqes(f1.getText(), f2.getText() JOptionPane.showMessageDialog(this, 該用戶已被注冊,請重新輸入!);Sy

34、stem.exit(0); else tools.addUser(f1.getText(), f1.getText();JOptionPane.showMessageDialog(this, 你已經(jīng)成功注冊);System.exit(0);if (f1.getText().equals() | f2.getText().equals() JOptionPane.showMessageDialog(this, 帳號或密碼長度有誤, 提示,JOptionPane.WARNING_MESSAGE);if (e.getActionCommand().equals(退出) System.exit(0);

35、4.5.6、新注冊管理員(用戶名:qunqun;密碼:qunqun)登入效果如下:圖 4 .12 登錄界面圖 4 .13 登錄成功界面4.5.7、主要代碼:static boolean eqes(String admin, String passwd) boolean bool = true;try InputStream is = new FileInputStream(1111.txt);BufferedReader reader = new BufferedReader(new InputStreamReader(is);String line = reader.readLine();

36、while (line != null) / 如果 line 為空說明讀完了String str = line.trim().split(#);for (int i = 0; i line.trim().split(#).length; i+) if (admin.equals(str0) if (passwd.equals(str1) return true; else bool = false; else bool = false;line = reader.readLine(); catch (Exception e) e.printStackTrace();return bool;st

37、atic void addUser(String admin, String passwd) File f = new File(1111.txt);String oldStr = ;try FileReader fr = new FileReader(f);BufferedReader bufr = new BufferedReader(fr);String line = null;while (line = bufr.readLine() != null) oldStr += line+rn; catch (FileNotFoundException e1) e1.printStackTr

38、ace(); catch (IOException e) e.printStackTrace();String content = oldStr+admin + # + passwd;try FileWriter fw=new FileWriter(f);BufferedWriter bufw = new BufferedWriter(fw);bufw.write(content);bufw.newLine();bufw.close(); fw.close(); catch (Exception e) e.printStackTrace();答辯記錄答辯日期答辯地點(diǎn)主要問題答辯要點(diǎn)成績考核表成績評定項(xiàng) 目參考權(quán)重實(shí)際權(quán)重原始成績加權(quán)成績1、作品質(zhì)量程度(100分計(jì))0.42、報(bào)告書寫(100分計(jì))0.23、答辯(100分計(jì))0.4總 成 績

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(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ù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!