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

正文內(nèi)容

java課程設(shè)計(jì)——學(xué)生信息管理系統(tǒng)(存儲(chǔ)版)

  

【正文】 菜單項(xiàng),點(diǎn)擊時(shí)跳出對(duì)話(huà)框問(wèn)是否真的退出,若點(diǎn)擊是,窗口關(guān)閉,若點(diǎn)擊否,回復(fù)原界面。 TeacherMainUI(){ ctp = ()。 } public void buildMainMenu(JMenuBar menuBar){ JMenu fileMenu=new JMenu(文件)。 (new QueryActionListener())。 JMenuItem addScoreMenuItem=new JMenuItem(增加成績(jī)信息)。 (addScoreMenuItem)。 } } class DeleteActionListener implements ActionListener{ public void actionPerformed(ActionEvent e){ new StudentDeleteUI()。import .*。public class InformationQueryUI extends JFrame{ JLabel selectionLabel。 JTable table。 (姓名)。 (new FlowLayout())。//給檢索按鈕注冊(cè)事件 table = new JTable()。 } class SelectedListener implements ItemListener{ public void itemStateChanged(ItemEvent event) { if (() == ) { selectedNum = ()。 break。 (姓名)。 Student oneStudent = (Student) (i)。 (model)。import .*。 JPanel topPanel。 JPanel bottomPanel。 (selectionLabel)。 bottomPanel = new JPanel()。 VectorString head = new Vector()。 i ()。 (row)。若添加成功,提示成功,否則提示失敗。 JButton bt1, bt2。 t3 = new JTextField(24)。 (l1)。 (l3)。 (l5)。 (new CloseListener())。 } class AddListener implements ActionListener{ public void actionPerformed(ActionEvent arg0) { StudentDao oneStudentDao = new StudentDao()。 ()。 }}執(zhí)行截圖如下:(9)StudentDeleteUI類(lèi):此類(lèi)為刪除學(xué)生基本信息界面類(lèi),在此界面中有一個(gè)標(biāo)簽,一個(gè)文本框,還有兩個(gè)按鈕“刪除”“退出”。import 。 JPanel p1 = new JPanel()。 (280, 300, 80, 30)。 (true)。 } else { (null, delete failure, 提示信息, )。import .*。 l2 = new JLabel(姓名)。 t5 = new JTextField(20)。 (t1)。 (t3)。 (t5)。 (p1)。 } class AddListener implements ActionList。 (new CloseListener())。 (l5)。 (l3)。 (l1)。 t3 = new JTextField(20)。 JButton bt1, bt2。若添加成功,提示成功,否則提示失敗。 if (issuccess) { (null, delete success, 提示信息, )。 (刪除畢業(yè)生界面)。 (140, 300, 80, 30)。 bt1 = new JButton(刪除)。import .*。 } } } class CloseListener implements ActionListener{ public void actionPerformed(ActionEvent e) { dispose()。 boolean issuccess = (num, sname, sex,age,dept)。 (new WindowAdapter() {// 匿名類(lèi)開(kāi)始 public void windowClosing(WindowEvent e) // 把退出窗口的語(yǔ)句寫(xiě)在本方法中 { dispose()。 (bt2)。 (t4)。 (t2)。 (null)。 t1 = new JTextField(12)。public class StudentAddUI extends JFrame{ JLabel l1, l2, l3, l4, l5。根據(jù)五個(gè)標(biāo)簽的提示,分別在五個(gè)文本框中輸入信息。 (())。 VectorVector content = new Vector()。 ScoreDao oneScore=new ScoreDao()。 bookScrollPane = new JScrollPane(table)。 (new FlowLayout())。 JTable table。import 。ScoreQueryUI類(lèi)源代碼:package ui。 (row)。 i ()。 VectorString head = new Vector()。 break。 (600, 450)。 (, topPanel)。 retrievalButton = new JButton(檢索)。 (請(qǐng)選擇...)。 String fieldSelected。import 。在文本框中輸入要檢索的屬性?xún)?nèi)容,單擊“檢索”按鈕時(shí),通過(guò)注冊(cè)事件,在內(nèi)部類(lèi)的方法中把剛才獲取的屬性參數(shù)和內(nèi)容參數(shù)傳給StudentDao類(lèi)的queryStudent()方法,從而獲取檢索內(nèi)容,再把檢索得到的內(nèi)容通過(guò)Vector對(duì)象放入ArrayList類(lèi)的對(duì)象lis中,從而使檢索結(jié)果顯示在表格中。 } } class QueryActionListener implements ActionListener{ public void actionPerformed(ActionEvent e){ new InformationQueryUI()。//注冊(cè)事件 (addMenuItem)。 JMenuItem addMenuItem=new JMenuItem(增加新生信息)。 JMenuItem queryMenuItem=new JMenuItem(學(xué)生基本信息)。 (100, 100, 400, 300)。import .*。 } } public static void main(String[] args) { new TeacherLoginUI()。 } class LoginActionListener implements ActionListener { public void actionPerformed(ActionEvent e) { String st1 = ()。//注冊(cè)事件 cp = getContentPane()。 (250, 190, 80, 30)。 JPanel p1 = new JPanel()。 JButton bt1, bt2。TeacherLoginUI類(lèi)源代碼:package ui。 (())。 for (int i = 0。 ArrayList lis = (aa)。 bookScrollPane = new JScrollPane(table)。 JPanel bottomPanel。import 。調(diào)用ScoreDao類(lèi)中的queryScore1(),將得到的ArrayList對(duì)象lis放入Vector對(duì)象中,形成表格。 if (isSuccess) { new StudentScoreUI()。 (400, 400)。 (280, 230, 80, 30)。 (250, 150, 80, 30)。 t1 = new JTextField(12)。 JTextField t1。輸入后,從兩個(gè)文本框中獲取用戶(hù)輸入的內(nèi)容,點(diǎn)擊“登陸”按鈕時(shí),調(diào)用StudentDao類(lèi)中的studentLogin()方法驗(yàn)證是否存在該用戶(hù)。 (new WindowAdapter() { public void windowClosing(WindowEvent e) { (0)。 (new TeacherLoginActionListener())。 JPanel p1 = new JPanel()。import .*。 = sname。 } public String getSex() { return sex。 String sname。 = credit。 } public void setScore(int score) { = score。 int credit。String course。 (sql)。 } catch (SQLException e) { ()。 (1, num)。 ResultSet rs = (sql)。 } public ArrayList queryScore1(String key) { ArrayList lis = new ArrayList()。% + key + %39。import 。若刪除成功,返回 true,否則返回falseScoreDao類(lèi)源代碼: package dao。 return isfound。 PreparedStatement pst。import 。 int count = (sql)。 } return lis。 String sql = select * from student where + field + like 39。// 返回修改的記錄數(shù) if (count == 1) return true。 PreparedStatement pst。 (1, sname)。import 。若插入成功,返回true,否則返回falsedeleteStudent()方法中,有一個(gè)參數(shù),傳給delete語(yǔ)句中的sname(學(xué)生姓名),利用delete語(yǔ)句,把student表中相關(guān)學(xué)生信息刪除。 } return con。 (dbDriver)。以上就是該學(xué)生信息管理系統(tǒng)的操作步驟。輸入后,單擊“檢索”按鈕,則開(kāi)始數(shù)據(jù)庫(kù)查詢(xún)。當(dāng)查詢(xún)學(xué)生成績(jī)信息時(shí),從此表獲取數(shù)據(jù)。截圖如下:在teacher(教師登陸)表中,有兩個(gè)屬性列,分別為:tname(教師姓名),password(登錄密碼)。在查詢(xún)功能里面,可以選擇是查詢(xún)學(xué)生基本信息,還是查詢(xún)學(xué)生成績(jī)信息。一.引言 項(xiàng)目的名稱(chēng)學(xué)生信息管理系統(tǒng) 項(xiàng)目背景和目標(biāo) 學(xué)生信息管理系主要對(duì)在校學(xué)生的個(gè)人基本信息以及成績(jī)信息進(jìn)行管理,對(duì)教師用戶(hù)提供查詢(xún)信息、增添信息、刪除信息等操作功能;對(duì)學(xué)生用戶(hù)提供成績(jī)查詢(xún)功能。為了保護(hù)學(xué)生成績(jī)隱私,每位學(xué)生登錄系統(tǒng)后只能查詢(xún)自己的成績(jī),而無(wú)法看到別人的成績(jī)?nèi)?、系統(tǒng)設(shè)計(jì)3.1開(kāi)發(fā)與設(shè)計(jì)的總體思想 教師方面:教師通過(guò)自己的用戶(hù)名和密碼登錄后,進(jìn)入教師主界面,在這個(gè)主界面里,可以選擇要操作的類(lèi)別,即查詢(xún)功能還是修改功能。當(dāng)查詢(xún)學(xué)生基本信息時(shí),從此表中獲取數(shù)據(jù)。其基本數(shù)據(jù)類(lèi)型分別為:int,char,char,int,int。若要查詢(xún)學(xué)生基本信息,點(diǎn)擊菜單項(xiàng)則進(jìn)入學(xué)生基本信息檢索界面,在此界面的檢索方式中選擇要檢索的數(shù)據(jù)屬性,在檢索內(nèi)容框中輸入檢索的具體信息,例如,檢索“姓名”字段時(shí),要鍵入某個(gè)學(xué)生姓名。在刪除信息操作中,輸入要?jiǎng)h除信息的學(xué)生姓名,單擊“刪除”按鈕,若刪除成功,則提示成功,若刪除失敗則提示失敗。 public static Connection getConnection() { try { String dbDriver=。 ()。若存在此信息,返回true,否則返回falseaddStudent()方法中,有五個(gè)參數(shù),分別傳給insert語(yǔ)句中的num(學(xué)號(hào)),sname(學(xué)生姓名),age(年齡),sex(性別)和dept(系別),利用insert語(yǔ)句向student學(xué)生基本信息表中插入學(xué)生記錄。import 。 try { pst = (select * from studentlogin where sname=? and password=?)。 }
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1