




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
PAGEPAGE31目錄TOC\o"1-3"\f\h\z課程設(shè)計(jì)任務(wù)書一 2課程設(shè)計(jì)任務(wù)書二 3圖書管理系統(tǒng) 4一、問題描述 4二、基本要求 4三、類定義 4四、主要成員函數(shù)描述 4五、測(cè)試數(shù)據(jù)及情況 9畢業(yè)生選題管理系統(tǒng) 10一、問題描述 10二、基本要求 10三、類定義 10四、主要成員函數(shù)描述 10五、測(cè)試數(shù)據(jù)及情況 12結(jié)論 13參考文獻(xiàn) 14
山東建筑大學(xué)計(jì)算機(jī)科學(xué)與技術(shù)學(xué)院課程設(shè)計(jì)任務(wù)書一設(shè)計(jì)題目圖書管理系統(tǒng)已知技術(shù)參數(shù)和設(shè)計(jì)要求1) 該系統(tǒng)主要處理圖書館中的圖書信息以及供應(yīng)商向圖書館供應(yīng)圖書的信息。2) 圖書信息主要包括:圖書編號(hào)、圖書名稱、圖書類型、作者、出版社、庫(kù)存等內(nèi)容。3)供應(yīng)商信息主要包括:供應(yīng)商編號(hào)、供應(yīng)商名稱、供書類型、地址、電話等內(nèi)容4)其中,圖書類型和供書類型是都是書籍類型(如:信息類、建筑類、化學(xué)類、生物類等)5) 完成以下的操作:實(shí)現(xiàn)圖書信息的添加、修改、刪除和查詢;圖書供應(yīng)商信息的添加、修改、刪除和查詢;書籍類型的添加、修改、刪除和查詢;供應(yīng)商向圖書館供應(yīng)圖書的情況查詢、統(tǒng)計(jì)。設(shè)計(jì)內(nèi)容與步驟1)建立主類,包含7分個(gè)類,分別實(shí)現(xiàn)各自的功能。2)采用圖形界面。3)實(shí)現(xiàn)圖書管理與供應(yīng)商的管理。4)程序設(shè)計(jì)、實(shí)現(xiàn)、調(diào)試5)完成課程設(shè)計(jì)說明書設(shè)計(jì)工作計(jì)劃與進(jìn)度安排1)設(shè)計(jì)工作4學(xué)時(shí)2)實(shí)現(xiàn)與調(diào)試12學(xué)時(shí)3)課程設(shè)計(jì)說明書4學(xué)時(shí)設(shè)計(jì)考核要求考勤20%課程設(shè)計(jì)說明書50%。3)答辯30%指導(dǎo)教師(簽字):教研室主任(簽字)
山東建筑大學(xué)計(jì)算機(jī)科學(xué)與技術(shù)學(xué)院課程設(shè)計(jì)任務(wù)書二設(shè)計(jì)題目畢業(yè)生選題管理系統(tǒng)已知技術(shù)參數(shù)和設(shè)計(jì)要求1) 該系統(tǒng)主要處理畢業(yè)生的選題信息。2) 學(xué)生信息主要包括:學(xué)號(hào)、姓名、電話、選題等內(nèi)容。3) 課題信息主要包括:課題編號(hào)、課題名稱、指導(dǎo)教師等內(nèi)容。4) 完成以下的操作:學(xué)生信息、課題信息的錄入、修改、刪除和查詢。設(shè)計(jì)內(nèi)容與步驟1)建立學(xué)校類、學(xué)生類、課題類、選題類2)學(xué)校、學(xué)生、課題、選題信息的初始化3)學(xué)校、學(xué)生、課題、選題信息的添加、修改、刪除、查找4)學(xué)校、學(xué)生、課題、選題信息的輸出5)對(duì)選題信息按學(xué)號(hào)、課題編號(hào)排序6)程序設(shè)計(jì)、實(shí)現(xiàn)、調(diào)試7)完成課程設(shè)計(jì)說明書設(shè)計(jì)工作計(jì)劃與進(jìn)度安排設(shè)計(jì)工作4學(xué)時(shí)實(shí)現(xiàn)與調(diào)試12學(xué)時(shí)課程設(shè)計(jì)說明書4學(xué)時(shí)設(shè)計(jì)考核要求考勤20%2)課程設(shè)計(jì)說明書50%3)答辯30%指導(dǎo)教師(簽字):教研室主任(簽字):
圖書管理系統(tǒng)一、問題描述運(yùn)用Java語言設(shè)計(jì)圖書管理系統(tǒng)。該系統(tǒng)實(shí)現(xiàn):1) 該系統(tǒng)主要處理圖書館中的圖書信息以及供應(yīng)商向圖書館供應(yīng)圖書的信息。2) 圖書信息主要包括:圖書編號(hào)、圖書名稱、圖書類型、作者、出版社、庫(kù)存等內(nèi)容。3)供應(yīng)商信息主要包括:供應(yīng)商編號(hào)、供應(yīng)商名稱、供書類型、地址、電話等內(nèi)容4)其中,圖書類型和供書類型是都是書籍類型(如:信息類、建筑類、化學(xué)類、生物類等)5) 完成以下的操作:實(shí)現(xiàn)圖書信息的添加、修改、刪除和查詢;圖書供應(yīng)商信息的添加、修改、刪除和查詢;書籍類型的添加、修改、刪除和查詢;供應(yīng)商向圖書館供應(yīng)圖書的情況查詢、統(tǒng)計(jì)。二、基本要求1)建立書籍類型類、圖書類、供應(yīng)商類2)書籍類型、圖書信息、供應(yīng)商的初始化3)書籍類型、圖書信息、供應(yīng)商的添加、修改、刪除、查找4)對(duì)圖書信息按編號(hào)、書名排序5)將圖書信息和供應(yīng)商信息保存為文件三、類定義1、圖書管理(BooksmanagementSystem)四、主要成員函數(shù)描述圖書添加信息的界面publicclassBookAddimplementsActionListener{ JFramesAddF; JPaneladdP1,addP2; JLabelbookNumL,bookNameL,bookTypeL,bookAuthorL,bookPressL, bookInventoryL,bookNumL2,bookNameL2,bookTypeL2,bookAuthorL2, bookPressL2,bookInventoryL2; JTextFieldbookNumT,bookNameT,bookTypeT,bookAuthorT,bookPressT, bookInventoryT; JButtonaddsureB,addCancelB; StringDBDriver="sun.jdbc.odbc.JdbcOdbcDriver"; StringconnectionStr="jdbc:odbc:book"; Connectioncon=null; PreparedStatementpstmtadds=null; PreparedStatementpstmtselect=null; ResultSetrs=null; StringsqlAdds="insertintobookinfo(bookNum,bookName,bookType,bookAuthor,bookPress,bookInventory)values(?,?,?,?,?,?)"; StringsqlDisplay="Select*frombookinfowherebookNum=?"; Stringbooknum,bookname,booktype,bookauthor,bookpress,bookinventory; booleanb1,b2; BookAdd(){ sAddF=newJFrame("添加圖書信息"); addP1=newJPanel(); addP1.setLayout(newGridLayout(6,3)); bookNumL=newJLabel("圖書編號(hào)"); bookNumT=newJTextField(); bookNumT.addActionListener(this); bookNumL2=newJLabel(); bookNameL=newJLabel("圖書名稱:"); bookNameT=newJTextField(); bookNameT.addActionListener(this); bookNameL2=newJLabel(); bookTypeL=newJLabel("圖書類型:"); bookTypeT=newJTextField(); bookTypeT.addActionListener(this); bookTypeL2=newJLabel(); bookAuthorL=newJLabel("作者:"); bookAuthorT=newJTextField(); bookAuthorT.addActionListener(this); bookAuthorL2=newJLabel(); bookPressL=newJLabel("出版社:"); bookPressT=newJTextField(); bookPressT.addActionListener(this); bookPressL2=newJLabel(); bookInventoryL=newJLabel("庫(kù)存:"); bookInventoryT=newJTextField(); bookInventoryT.addActionListener(this); bookInventoryL2=newJLabel(); addP1.add(bookNumL); addP1.add(bookNumT); addP1.add(bookNumL2); addP1.add(bookNameL); addP1.add(bookNameT); addP1.add(bookNameL2); addP1.add(bookTypeL); addP1.add(bookTypeT); addP1.add(bookTypeL2); addP1.add(bookAuthorL); addP1.add(bookAuthorT); addP1.add(bookAuthorL2); addP1.add(bookPressL); addP1.add(bookPressT); addP1.add(bookPressL2); addP1.add(bookInventoryL); addP1.add(bookInventoryT); addP1.add(bookInventoryL2); sAddF.add(BorderLayout.NORTH,addP1); addP2=newJPanel(); addsureB=newJButton("添加"); addsureB.addActionListener(this); addP2.add(addsureB); addCancelB=newJButton("取消"); addCancelB.addActionListener(this); addP2.add(addCancelB); sAddF.add(BorderLayout.CENTER,addP2); sAddF.setSize(600,210); sAddF.setLocation(450,120); sAddF.setVisible(true); sAddF.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);對(duì)圖書添加信息的監(jiān)聽publicvoidactionPerformed(ActionEvente){ if(e.getSource()==bookNumT){ booknum=bookNumT.getText().trim(); bookNumTest(); } if(e.getSource()==bookNameT){ bookname=bookNameT.getText().trim(); bookNameTest(); } if(e.getSource()==bookTypeT){ booktype=bookTypeT.getText().trim(); bookTypeTest(); } if(e.getSource()==bookAuthorT){ bookauthor=bookAuthorT.getText().trim(); bookAuthorTest(); } if(e.getSource()==bookPressT){ bookpress=bookPressT.getText().trim(); bookPressTest(); } if(e.getSource()==bookInventoryT){ bookinventory=bookInventoryT.getText().trim(); bookInventoryTest(); } if(e.getSource()==addsureB){ GotbookSource(); bookNumTest(); bookNameTest(); bookTypeTest(); bookAuthorTest(); bookPressTest(); bookInventoryTest(); if(b1&&b2){ try{ AddbookTo(); }catch(Exceptione1){ e1.printStackTrace(); } }else{ } } if(e.getSource()==addCancelB){ sAddF.dispose(); } } voidbookNumTest(){ if(booknum.equals("")){ bookNumL2.setText("該值不能為空,請(qǐng)重新輸入!"); }else{ b1=true; bookNumL2.setText(""); } if(b1){ try{ con=DriverManager.getConnection(connectionStr,"",""); pstmtselect=con.prepareStatement(sqlDisplay); pstmtselect.setString(1,booknum); rs=pstmtselect.executeQuery(); if(rs.next()){ bookNumL2.setText("該圖書編號(hào)已被占用,請(qǐng)重新輸入!"); b1=false; }else{ bookNumL2.setText(""); } pstmtselect.close(); con.close(); }catch(SQLExceptione){ e.printStackTrace(); } } } voidbookNameTest(){ if(bookname.equals("")){ bookNameL2.setText("該值不能為空,請(qǐng)重新輸入!"); }else{ bookNameL2.setText(""); b2=true; } } voidbookTypeTest(){ if(booktype.equals("")){ bookTypeL2.setText("該值為空,請(qǐng)注意!"); }else{ bookTypeL2.setText(""); } } voidbookAuthorTest(){ if(bookauthor.equals("")){ bookAuthorL2.setText("該值為空,請(qǐng)注意!"); }else{ bookAuthorL2.setText(""); } } voidbookPressTest(){ if(bookpress.equals("")){ bookPressL2.setText("該值為空,請(qǐng)注意!"); }else{ bookPressL2.setText(""); } } voidbookInventoryTest(){ if(bookinventory.equals("")){ bookInventoryL2.setText("該值為空,請(qǐng)注意!"); }else{ bookInventoryL2.setText(""); } } voidGotbookSource(){ booknum=bookNumT.getText().trim(); bookname=bookNameT.getText().trim(); booktype=bookTypeT.getText().trim(); bookauthor=bookAuthorT.getText().trim(); bookpress=bookPressT.getText().trim(); bookinventory=bookInventoryT.getText().trim(); } voidAddbookTo()throwsException{ con=DriverManager.getConnection(connectionStr,"",""); pstmtadds=con.prepareStatement(sqlAdds); pstmtselect=con.prepareStatement(sqlDisplay); pstmtadds.setString(1,booknum); pstmtadds.setString(2,bookname); pstmtadds.setString(3,booktype); pstmtadds.setString(4,bookauthor); pstmtadds.setString(5,bookpress); pstmtadds.setString(6,bookinventory); pstmtadds.executeUpdate(); pstmtselect.setString(1,booknum); rs=pstmtselect.executeQuery(); while(rs.next()){ JOptionPane.showMessageDialog( JOptionPane.getRootFrame(), rs.getString("bookNum")+"" +rs.getString("bookName")+"" +rs.getString("booktype")+"" +rs.getString("bookauthor")+"" +rs.getString("bookpress")+"" +rs.getString("bookinventory"),"添加成功", JOptionPane.INFORMATION_MESSAGE); } pstmtadds.close(); con.close(); }} }對(duì)供應(yīng)商添加信息的監(jiān)聽。publicvoidactionPerformed(ActionEvente){ if(e.getSource()==supplierNumT){ suppliernum=supplierNumT.getText().trim(); supplierNumTest(); } if(e.getSource()==supplierNameT){ suppliername=supplierNameT.getText().trim(); supplierNameTest(); } if(e.getSource()==supplierBookTypeT){ supplierbooktype=supplierBookTypeT.getText().trim(); supplierBookTypeTest(); } if(e.getSource()==supplierAddressT){ supplieraddress=supplierAddressT.getText().trim(); supplierAddressTest(); } if(e.getSource()==supplierPhoneT){ supplierphone=supplierPhoneT.getText().trim(); supplierPhoneTest(); } if(e.getSource()==addsureB){ GotsupplierSource(); supplierNumTest(); supplierNameTest(); supplierBookTypeTest(); supplierAddressTest(); supplierPhoneTest(); if(b1&&b2&&b3){ try{ AddsupplierTo(); }catch(Exceptione1){ e1.printStackTrace(); } }else{ } } if(e.getSource()==addCancelB){ sAddF.dispose(); } } voidsupplierNumTest(){ if(suppliernum.equals("")){ supplierNumL2.setText("該值不能為空,請(qǐng)重新輸入!"); }else{ b1=true; supplierNumL2.setText(""); } if(b1){ try{ con=DriverManager.getConnection(connectionStr,"",""); pstmtselect=con.prepareStatement(sqlDisplay); pstmtselect.setString(1,suppliernum); rs=pstmtselect.executeQuery(); if(rs.next()){ supplierNumL2.setText("該供應(yīng)商編號(hào)已被占用,請(qǐng)重新輸入!"); b1=false; }else{ supplierNumL2.setText(""); } pstmtselect.close(); con.close(); }catch(SQLExceptione){ e.printStackTrace(); } } } voidsupplierNameTest(){ if(suppliername.equals("")){ supplierNameL2.setText("該值不能為空,請(qǐng)重新輸入!"); }else{ supplierNameL2.setText(""); b2=true; } } voidsupplierBookTypeTest(){ if(supplierbooktype.equals("")){ supplierBookTypeL2.setText("該值為空,請(qǐng)注意!"); }else{ supplierBookTypeL2.setText(""); } } voidsupplierAddressTest(){ if(supplieraddress.equals("")){ supplierAddressL2.setText("該值為空,請(qǐng)注意!"); }else{ supplierAddressL2.setText(""); } } voidsupplierPhoneTest(){ if(supplierphone.equals("")){ supplierPhoneL2.setText("該值為空,請(qǐng)注意!"); b3=true; }else{ supplierPhoneL2.setText(""); b3=true; if(isPhoneNumber(supplierphone)){ }else{ supplierPhoneL2.setText("電話格式錯(cuò)誤,請(qǐng)您重新輸入!"); b3=false; } } } voidGotsupplierSource(){ suppliernum=supplierNumT.getText().trim(); suppliername=supplierNameT.getText().trim(); supplierbooktype=supplierBookTypeT.getText().trim(); supplieraddress=supplierAddressT.getText().trim(); supplierphone=supplierPhoneT.getText().trim(); } voidAddsupplierTo()throwsException{ con=DriverManager.getConnection(connectionStr,"",""); pstmtadds=con.prepareStatement(sqlAdds); pstmtselect=con.prepareStatement(sqlDisplay); pstmtadds.setString(1,suppliernum); pstmtadds.setString(2,suppliername); pstmtadds.setString(3,supplierbooktype); pstmtadds.setString(4,supplieraddress); pstmtadds.setString(5,supplierphone); pstmtadds.executeUpdate(); pstmtselect.setString(1,suppliernum); rs=pstmtselect.executeQuery(); while(rs.next()){ JOptionPane.showMessageDialog( JOptionPane.getRootFrame(), rs.getString("supplierNum")+"" +rs.getString("supplierName")+"" +rs.getString("supplierbooktype")+"" +rs.getString("supplieraddress")+"" +rs.getString("supplierphone"),"添加成功", JOptionPane.INFORMATION_MESSAGE); } pstmtadds.close(); con.close(); }}五、測(cè)試數(shù)據(jù)及情況運(yùn)行界面:
畢業(yè)生選課管理系統(tǒng)一、問題描述運(yùn)用Java語言描述:1) 該系統(tǒng)主要處理畢業(yè)生的選題信息。2) 學(xué)生信息主要包括:學(xué)號(hào)、姓名、電話、選題等內(nèi)容。3) 課題信息主要包括:課題編號(hào)、課題名稱、指導(dǎo)教師等內(nèi)容。4) 完成以下的操作:學(xué)生信息、課題信息的錄入、修改、刪除和查詢。二、基本要求1)建立學(xué)校類、學(xué)生類、課題類、選題類2)學(xué)校、學(xué)生、課題、選題信息的初始化3)學(xué)校、學(xué)生、課題、選題信息的添加、修改、刪除、查找4)學(xué)校、學(xué)生、課題、選題信息的輸出5)對(duì)選題信息按學(xué)號(hào)、課題編號(hào)排序三、類定義Main(主類),KT,School,Student,XKXX,XSXX,XTXX,Xuanti,XXXX。作。四、主要成員函數(shù)描述創(chuàng)建學(xué)校信息的文本域,在文本域內(nèi)填寫信息。publicclassSchoolextendsJFrame{ JPaneljp; JButtonjb1,jb2,jb3,jb4; JTextFieldjt1,jt2,jt3,jt4; JLabeljl1,jl2,jl3,jl4,jl5,jl6; Statementstmt; Stringdburl="jdbc:odbc:driver={MicrosoftAccessDriver(*.mdb)};DBQ=biyesheng.mdb"; StringDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";//加載驅(qū)動(dòng)器的表達(dá)式 StringconnectionStr="jdbc:odbc:biyesheng";//連接數(shù)據(jù)庫(kù)的表達(dá)式 Connectioncon=null;//數(shù)據(jù)庫(kù)連接對(duì)象 PreparedStatementpstmt; ResultSetrs=null; publicSchool(){ super("學(xué)校信息"); jp=newJPanel(); setLayout(newGridLayout(6,9)); jb1=newJButton("錄入"); add(jb1); jb2=newJButton("修改"); add(jb2); jb3=newJButton("刪除"); add(jb3); jb4=newJButton("查找"); add(jb4); jl3=newJLabel("編號(hào)"); add(jl3); jt1=newJTextField(""); add(jt1); jl4=newJLabel("名稱"); add(jl4); jt2=newJTextField(""); add(jt2); jl5=newJLabel("地址"); add(jl5); jt3=newJTextField(""); add(jt3); jb1.addActionListener(newActionEventHandler()); jb2.addActionListener(newActionEventHandler()); jb3.addActionListener(newActionEventHandler()); jb4.addActionListener(newActionEventHandler()); setSize(400,300); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}對(duì)文本域進(jìn)行監(jiān)聽。classActionEventHandlerimplementsActionListener{ publicvoidactionPerformed(ActionEvente){ if(e.getSource()==jb1){//添加 try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }catch(java.lang.ClassNotFoundExceptione2) { System.err.print("ClassNotFoundException:"); System.err.println(e2.getMessage()); } try { con=DriverManager.getConnection(dburl,"",""); stmt=con.createStatement(); StringsqlTianjia="insertintoschool"+"values(?,?,?)"; pstmt=con.prepareStatement(sqlTianjia); pstmt.setString(1,jt1.getText()); pstmt.setString(2,jt2.getText()); pstmt.setString(3,jt3.getText()); pstmt.executeUpdate(); System.out.println(jt1.getText()+"\n"+jt2.getText()+"\n"+jt3.getText()); System.out.println("添加成功"); stmt.close(); con.close(); }catch(Exceptione1) { //TODO:handleexception } } elseif(e.getSource()==jb2){ newSchInfoModify(); } elseif(e.getSource()==jb3){ try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }catch(ClassNotFoundExceptione2) { e2.printStackTrace(); } try{ Stringsql1="deletefromschoolwhere編號(hào)=?"; con=DriverManager.getConnection(dburl,"",""); pstmt=con.prepareStatement(sql1); pstmt.setString(1,jt1.getText()); pstmt.executeUpdate(); }catch(SQLExceptione1){ e1.printStackTrace(); } } elseif(e.getSource()==jb4){//查找 try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }catch(java.lang.ClassNotFoundExceptione2) { } try { con=DriverManager.getConnection(dburl,"",""); Stringstmt1Chaozhao="select*fromschoolwhere編號(hào)=?"; pstmt=con.prepareStatement(stmt1Chaozhao); pstmt.setString(1,jt1.getText()); rs=pstmt.executeQuery(); if(rs.next()){ jt1.setText(rs.getString("編號(hào)")); jt2.setText(rs.getString("名稱")); jt3.setText(rs.getString("地址")); } stmt.close(); con.close(); }catch(SQLExceptione1) { e1.printStackTrace(); } } }}publicstaticvoidmain(String[]args){ newSchool(); }}創(chuàng)建學(xué)生信息文本域,在文本域內(nèi)填加信息。publicclassStudentextendsJFrame{ JPaneljp; JButtonjb1,jb2,jb3,jb4; staticJTextFieldjt1,jt2,jt3,jt4,jt5; JLabeljl1,jl2,jl3,jl4,jl5,jl6,jl7; Statementstmt; Stringdburl="jdbc:odbc:driver={MicrosoftAccessDriver(*.mdb)};DBQ=biyesheng.mdb"; StringDBDriver="sun.jdbc.odbc.JdbcOdbcDriver"; StringconnectionStr="jdbc:odbc:biyesheng"; Connectioncon=null; PreparedStatementpstmt; ResultSetrs=null; publicStudent(){ super("學(xué)生信息"); jp=newJPanel(); setLayout(newGridLayout(7,2)); jl3=newJLabel("學(xué)號(hào)"); add(jl3); jt1=newJTextField(""); add(jt1); jl4=newJLabel("姓名"); add(jl4); jt2=newJTextField(""); add(jt2); jl5=newJLabel("手機(jī)號(hào)"); add(jl5); jt3=newJTextField(""); add(jt3); jl6=newJLabel("選題號(hào)"); add(jl6); jt4=newJTextField(""); add(jt4); jl7=newJLabel("學(xué)校編號(hào)"); add(jl7); jt5=newJTextField(""); add(jt5); jb1=newJButton("錄入"); add(jb1); jb2=newJButton("修改"); add(jb2); jb3=newJButton("刪除"); add(jb3); jb4=newJButton("查找"); add(jb4); jb1.addActionListener(newActionEventHandler()); jb2.addActionListener(newActionEventHandler()); jb3.addActionListener(newActionEventHandler()); jb4.addActionListener(newActionEventHandler()); setSize(300,400); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}對(duì)學(xué)生信息進(jìn)行監(jiān)聽。classActionEventHandlerimplementsActionListener{ publicvoidactionPerformed(ActionEvente){ if(e.getSource()==jb1){//添加 System.out.println("添加數(shù)據(jù)"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }catch(java.lang.ClassNotFoundExceptione2) { System.err.print("ClassNotFoundException:"); System.err.println(e2.getMessage()); } try { con=DriverManager.getConnection(dburl,"",""); stmt=con.createStatement(); StringsqlTianjia="insertintostudent"+"values(?,?,?,?,?)"; pstmt=con.prepareStatement(sqlTianjia);// sql="INSERTINTOs2"+"VALUES(\'"+jt1.getText()+"\',"+// ""+""+"\'"+jt2.getText()+"\',\'"+jt3.getText()+"\',"+"\'"+jt4.getText()+"\')"; pstmt.setString(1,jt1.getText()); pstmt.setString(2,jt2.getText()); pstmt.setString(3,jt3.getText()); pstmt.setString(4,jt4.getText()); pstmt.setString(5,jt5.getText()); pstmt.executeUpdate(); System.out.println(jt1.getText()+"\n"+jt2.getText()+"\n"+jt3.getText()+"\n"+jt4.ge
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二級(jí)Web考試滿意度總結(jié)試題及答案
- 電線電纜專用材料項(xiàng)目可行性研究報(bào)告
- 2025年軟件測(cè)試經(jīng)驗(yàn)總結(jié)與試題及答案
- 2025年計(jì)算機(jī)二級(jí)C語言知識(shí)點(diǎn)試題及答案
- 風(fēng)險(xiǎn)管理在企業(yè)文化中的體現(xiàn)試題及答案
- JAVA文件處理與流操作知識(shí)試題及答案
- 2025年計(jì)算機(jī)二級(jí)C語言考試要點(diǎn)試題及答案
- 2025年二級(jí)ACCESS考試考場(chǎng)Tips試題及答案
- 2025年二級(jí)ACCESS考試細(xì)節(jié)試題及答案解析
- 賦能未來2025年稅法考試試題及答案
- 1旅游概述《旅游學(xué)概論》省公開課一等獎(jiǎng)全國(guó)示范課微課金獎(jiǎng)?wù)n件
- DL∕T 5390-2014 發(fā)電廠和變電站照明設(shè)計(jì)技術(shù)規(guī)定
- 2024版民政局離婚協(xié)議書格式范文
- 安檢五步法的安檢流程
- 腫瘤學(xué)概論課件
- HJ 651-2013 礦山生態(tài)環(huán)境保護(hù)與恢復(fù)治理技術(shù)規(guī)范(試行)
- 關(guān)愛生命-急救與自救技能智慧樹知到期末考試答案章節(jié)答案2024年上海交通大學(xué)醫(yī)學(xué)院
- 2024年浙江省金華市東陽(yáng)市中考二模語文試題(原卷版+解析版)
- 《酒店消防安全培訓(xùn)》課件完整版
- 幼兒園高瞻課程
- 蔣詩(shī)萌小品《誰殺死了周日》臺(tái)詞完整版
評(píng)論
0/150
提交評(píng)論