freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java課程設(shè)計(jì)——學(xué)生信息管理系統(tǒng)-預(yù)覽頁

2025-05-01 06:04 上一頁面

下一頁面
 

【正文】 個(gè)參數(shù),分別傳給select語句中的tname(教師姓名)和password(登陸密碼),利用select語句在teacher表中檢索教師登陸信息。import 。public class TeacherDao { public boolean queryTeacher(String tname,String password) { DBConnection db=new DBConnection()。 try { pst = (select * from teacher where tname=? and password=?)。 if(()) isfound=true。 } public static void main(String[] args) { }}(3)ScoreDao類:此類中有四個(gè)方法,queryScore,queryScore1,addScore,deleteScor作用分別是為教師用戶提供查詢學(xué)生成績信息功能,為學(xué)生用戶提供詢本人成績信息功能,添加成績信息,刪除成績信息。若查詢成功,則返回一個(gè)ArrayList類的對(duì)象lis(表格),否則,異常處理addScore()方法中,有五個(gè)參數(shù),分別傳給insert語句中的num(學(xué)號(hào)),sname(學(xué)生姓名),course(課程名稱),score(成績),credit(學(xué)分)。import 。import 。import 。 Statement stm。 。 (score)。 Connection con = ()。% + + %39。 while (()) { Score score = new Score((1), (2), rs .getString(3), (4), (5))。 } public boolean addScore(int num, String sname, String course, int score, int credit) { Connection con = ()。 (2, sname)。 int count = ()。 } return false。 String sql = delete from score where sname like 39。 int count = (sql)。 } return false。int score。 String sname。 public int getNum() { return num。 } public String getCourse() { return course。 } public int getCredit() { return credit。 = sname。}}(2)Student類:此類中有五個(gè)成員變量,int num。String dept。 String sex。 } public void setNum(int num) { = num。 } public void setSex(String sex) { = sex。 } public void setDept(String dept) { = dept。 = sex。給這兩個(gè)按鈕注冊(cè)事件addActionListener,分別在內(nèi)部類TeacherLoginActionListene和StudentLoginActionListener中的默認(rèn)方法actionPerformed()中創(chuàng)建TeacherLoginUI類和StudentLoginUI類的對(duì)象,即打開教師登陸界面和學(xué)生登錄界面,并將原登陸界面關(guān)閉。import .*。 public LoginUI() { l1 = new JLabel(請(qǐng)選擇用戶類型)。 (null)。 (bt1)。//注冊(cè)事件 (new StudentLoginActionListener())。 (用戶登錄界面)。 } })。 dispose()。若存在,則創(chuàng)建StudentScoreUI類的對(duì)象,即打開學(xué)生成績界面,顯示此登陸學(xué)生的成績信息,若不存在,則提示密碼錯(cuò)誤。import .*。 JPasswordField t2。 public String st2。 t2 = new JPasswordField(12)。 (null)。 (t1)。 (t2)。 (bt2)。 (200, 200, (), ())。 (true)。 st2 = ()。 dispose()。 }}執(zhí)行截圖如下:(3)StudentScoreUI類:此類為學(xué)生成績界面,此類中有一個(gè)標(biāo)簽和一個(gè)表格。StudentScoreUI類源代碼:package ui。import .*。import 。 Container container。 public StudentScoreUI(){ container = ()。 (selectionLabel)。 (, bookScrollPane)。 (600, 450)。 VectorString head = new Vector()。 (成績)。 i ()。 (())。 (row)。 }}執(zhí)行截圖如下:(4)TeacherLoginUI類:此類為教師登陸界面,在這個(gè)界面上有兩個(gè)文本框,分別輸入教師姓名和登錄密碼,還有兩個(gè)按鈕,登陸和退出。import .*。public class TeacherLoginUI extends JFrame { JLabel l1, l2。 Container cp。 t2 = new JPasswordField(12)。 (null)。 (t1)。 (t2)。 (bt2)。 (200, 200, (), ())。 (true)。 String st2 = ()。 dispose()。 }}執(zhí)行截圖如下:(5)TeacherMainUI類:此類為教師主界面類,在此界面上有一個(gè)菜單欄,三個(gè)菜單:文件,查詢,修改。TeacherMainUI類源代碼:package ui。public class TeacherMainUI extends JFrame{Container ctp。 JMenuBar menuBar = new JMenuBar()。 (true)。//注冊(cè)事件 (exitMenuItem)。 JMenuItem queryScoreMenuItem=new JMenuItem(學(xué)生成績查詢)。 (queryScoreMenuItem)。 JMenuItem deleteMenuItem=new JMenuItem(刪除畢業(yè)生信息)。//注冊(cè)事件 (new DeleteActionListener())。 (deleteMenuItem)。 } class ExitActionListener implements ActionListener{ public void actionPerformed(ActionEvent e) { int result = (null, 真的要推出嗎?, 提示信息, , , null)。 } } class AddActionListener implements ActionListener{ public void actionPerformed(ActionEvent e){ new StudentAddUI()。 } } public static void main(String[] args) { new TeacherMainUI()。InformationQueryUI類源代碼:package ui。import .*。import 。 JButton retrievalButton。 int selectedNum。 public InformationQueryUI(){ container = ()。 (學(xué)號(hào))。 (系別)。 topPanel = new JPanel()。 (fieldComboBox)。 (new RetrievalActionListener())。 bottomPanel = new JPanel()。 (true)。 case 2: fieldSelected = sname。 case 4: fieldSelected = sex。 } String key = ()。 (學(xué)號(hào))。 (系別)。 i++) { Vector row = new Vector()。 (())。 } DefaultTableModel model = new DefaultTableModel(content, head)。 }}執(zhí)行截圖如下:(7)ScoreQueryUI類:此類為學(xué)生成績查詢界面類,在此界面有一個(gè)標(biāo)簽,一個(gè)文本框,一個(gè)按鈕。import .*。import .*。public class ScoreQueryUI extends JFrame{ JLabel selectionLabel。 Container container。 JScrollPane bookScrollPane。 keywordText = new JTextField(, 20)。 (() / 2, ())。 (, topPanel)。 (, bookScrollPane)。 (600, 450)。 ArrayList lis = (key)。 (學(xué)科)。 for (int i = 0。 (())。 (())。 repaint()。當(dāng)單擊“添加”按鈕時(shí),通過注冊(cè)事件,在內(nèi)部類的actionPerformed()方法中,獲取五個(gè)文本框中的信息,并轉(zhuǎn)換成相應(yīng)的基本數(shù)據(jù)類型,通過StudentDao類的addStudent()方法,將數(shù)據(jù)寫入數(shù)據(jù)庫的student表中。import .*。 JTextField t1, t2, t3, t4, t5。 l3 = new JLabel(性別)。 t2 = new JTextField(24)。 bt1 = new JButton(添加)。 (100, 100, 80, 30)。 (100, 140, 80, 30)。 (100, 180, 80, 30)。 (100, 220, 80, 30)。 (100, 260, 80, 30)。 (140, 300, 80, 30)。 (new AddListener())。 (增添新生錄入界面)。 } })。 String sex = ()。 if (issuccess) { (null, insert success, 提示信息, )。 ()。 } } public static void main(String[] args) { new StudentAddUI()。若刪除成功,提示成功,否則提示失敗。import .*。 JButton bt1, bt2。 bt2 = new JButton(退出)。 (l1)。 (bt1)。 (new CloseListener())。 (400, 400)。// 匿名類結(jié)束 } class DeleteListener implements ActionListener{ public void actionPerformed(ActionEvent arg0){ StudentDao oneStudentDao = new StudentDao()。 ()。 }}執(zhí)行截圖如下:(10)ScoreAddUI類:此類為添加學(xué)生成績信息界面類,在此界面中有五個(gè)標(biāo)簽,五個(gè)文本框,還有兩個(gè)按鈕“添加”“退出”。ScoreAddUI類源代碼:package ui。import 。 public ScoreAddUI(){ l1 = new JLabel(學(xué)號(hào))。 l5 = new JLabel(學(xué)分)。 t4 = new JTextField(20)。 JPanel p1 = new JPanel()。 (170, 100, 100, 30)。 (170, 140, 200, 30)。 (170, 180, 200, 30)。 (170, 220, 200, 30)。 (170, 260, 60, 30)。 (280, 300, 80, 30)。 (200, 200, (), ())。 (tr
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1