數(shù)據(jù)庫(kù)教學(xué)管理系統(tǒng)方案_第1頁(yè)
數(shù)據(jù)庫(kù)教學(xué)管理系統(tǒng)方案_第2頁(yè)
數(shù)據(jù)庫(kù)教學(xué)管理系統(tǒng)方案_第3頁(yè)
數(shù)據(jù)庫(kù)教學(xué)管理系統(tǒng)方案_第4頁(yè)
數(shù)據(jù)庫(kù)教學(xué)管理系統(tǒng)方案_第5頁(yè)
已閱讀5頁(yè),還剩40頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、 . . . 數(shù)據(jù)庫(kù)原理課程設(shè)計(jì)專(zhuān) 業(yè): 計(jì)算機(jī)科學(xué)與技術(shù) 班 級(jí): 計(jì)算機(jī)(2)班 指導(dǎo)教師: 石寶英 姓 名: 江 學(xué) 號(hào): 6 目 錄一、概述.01二、需求分析.02三、數(shù)據(jù)邏輯設(shè)計(jì).05四、軟件功能設(shè)計(jì).06五、程序源代碼.07六、結(jié)束語(yǔ).4142 / 45一、 概述1:項(xiàng)目背景教學(xué)管理作為學(xué)校管理的一個(gè)重要方面,其可變因素多,管理方面繁瑣復(fù)雜,時(shí)間跨度大,再加上其固有的基數(shù)大,因而形成了巨大的數(shù)據(jù)量。這些數(shù)據(jù)就是有用的信息,信息化對(duì)學(xué)生個(gè)人提出了駕馭和掌握最新信息技術(shù)的素質(zhì)要求;信息技術(shù)提供了對(duì)教學(xué)進(jìn)行重大革新的新手段;信息化也為提高教學(xué)質(zhì)量,提高管理水平,工作效率創(chuàng)造了有效途徑.

2、校園網(wǎng)信息系統(tǒng)建設(shè)的重要性越來(lái)越為成人高校所重視。2:編寫(xiě)目的該文檔編寫(xiě)的目的主要有以下幾點(diǎn):(1)、為軟件的編碼提供參考(2)、為軟件的使用者提供參考(3)、為軟件測(cè)試提供參考3:軟件定義該軟件是一款用于學(xué)校相關(guān)人員對(duì)學(xué)校日常教學(xué)的管理,其中包括對(duì)課程、選課、學(xué)生、班級(jí)、教師、成績(jī)等相關(guān)容的管理,具有學(xué)生管理、成績(jī)管理、班級(jí)管理、教師管理、課程管理等相關(guān)功能的小型數(shù)據(jù)庫(kù)管理應(yīng)用系統(tǒng)。4:開(kāi)發(fā)環(huán)境數(shù)據(jù)庫(kù):SQL Server 2005代碼編寫(xiě)工具:Eclipse繪圖工具:Microsoft Word二、需求分析1. 需求分析的任務(wù)需求分析的任務(wù)是調(diào)查應(yīng)用領(lǐng)域,對(duì)應(yīng)用領(lǐng)域中的信息要求和操作要求進(jìn)

3、行詳細(xì)分析,形成需求分析說(shuō)明書(shū)。重點(diǎn)是調(diào)查,收集與分析用戶在數(shù)據(jù)管理中的信息要求,處理要求,數(shù)據(jù)的安全性與完整性要求。為了完成需求分析的任務(wù),要詳細(xì)調(diào)查待開(kāi)發(fā)的數(shù)據(jù)庫(kù)應(yīng)用部門(mén)的情況,了解原系統(tǒng)工作概況,分析用戶的各種需求,在此基礎(chǔ)上確定新系統(tǒng)的功能。4新系統(tǒng)必須考慮今后的擴(kuò)充和改變,不能僅僅按當(dāng)前應(yīng)用需求來(lái)設(shè)計(jì)數(shù)據(jù)庫(kù)。2. 需要完成的功能1) 反映教學(xué)組織機(jī)構(gòu)的總體狀況。本教學(xué)管理系統(tǒng)主要由教師管理系統(tǒng),學(xué)生管理系統(tǒng)以與領(lǐng)導(dǎo)管理系統(tǒng)等組成。2) 使管理者熟悉各部門(mén)的業(yè)務(wù)活動(dòng)狀況。調(diào)查各部門(mén)的業(yè)務(wù)活動(dòng)情況,對(duì)現(xiàn)行管理信息有一個(gè)明確的認(rèn)識(shí)。3) 使管理者可以完成對(duì)學(xué)生成績(jī)表的瀏覽、查詢和修改。4)

4、 使管理者可以完成對(duì)教師授課情況等個(gè)方面的詳細(xì)信息的修改和查詢。5) 使管理者可以完成對(duì)各部門(mén)領(lǐng)導(dǎo)相關(guān)信息的查詢和修改。3. 數(shù)據(jù)字典學(xué)生表說(shuō)明數(shù)據(jù)項(xiàng)編號(hào)數(shù)據(jù)項(xiàng)名稱數(shù)據(jù)項(xiàng)含義數(shù)據(jù)類(lèi)型與存儲(chǔ)與其他數(shù)據(jù)關(guān)系別名s-01code學(xué)號(hào)varchar(30)s-02name學(xué)生varchar(50)編號(hào)s-03sexy學(xué)生性別nchar(1)性別s-04age學(xué)生年齡int年齡s-05address家庭住址varchar(100)住址s-06birthday生日datetime生日s-07grade所在班級(jí)varchar(60)班級(jí)s-08major所學(xué)專(zhuān)業(yè)varchar(50)系教師表說(shuō)明數(shù)據(jù)項(xiàng)編號(hào)數(shù)

5、據(jù)項(xiàng)名稱數(shù)據(jù)項(xiàng)含義數(shù)據(jù)類(lèi)型與存儲(chǔ)與其他數(shù)據(jù)關(guān)系別名t-01name教師varchar(30)t-02code教師編號(hào)varchar(50)編號(hào)t-03sexy教師性別nchar(1)性別t-04age教師年齡int年齡t-05address家庭住址varchar(100)住址t-06birthday生日datetime生日t-07salary每月所得工資int工資t-08major所教專(zhuān)業(yè)varchar(50)系t-09duty職稱varchar(50)職稱領(lǐng)導(dǎo)表說(shuō)明數(shù)據(jù)項(xiàng)編號(hào)數(shù)據(jù)項(xiàng)名稱數(shù)據(jù)項(xiàng)含義數(shù)據(jù)類(lèi)型與存儲(chǔ)與其他數(shù)據(jù)關(guān)系別名l-01name領(lǐng)導(dǎo)varchar(30)l-02code領(lǐng)導(dǎo)編號(hào)

6、varchar(50)編號(hào)l-03sexy領(lǐng)導(dǎo)性別nchar(1)性別l-04age領(lǐng)導(dǎo)年齡int年齡l-05address家庭住址varchar(100)住址l-06birthday生日datetime生日l(shuí)-07salary每月所得工資int工資l-08major所在院系varchar(50)系l-09duty職稱varchar(50)職稱課程表說(shuō)明數(shù)據(jù)項(xiàng)編號(hào)數(shù)據(jù)項(xiàng)名稱數(shù)據(jù)項(xiàng)含義數(shù)據(jù)類(lèi)型與存儲(chǔ)與其他數(shù)據(jù)關(guān)系別名c-01name課程名稱varchar(30)課程名c-02code課程號(hào)varchar(50)課程號(hào)c-03credit所得學(xué)分int學(xué)分c-04precourse先行課varch

7、ar(50)先行課c-05quarter上課季度varchar(50)季度c-06teachername授課教師名varchar(50)同教師教師名c-07studentnumber所容納學(xué)生數(shù)int學(xué)生數(shù)c-08classnumber教室號(hào)int教室號(hào)c-09grade上課的班級(jí)varchar(50)班級(jí)c-10major上課學(xué)生所在院系varchar(50)同學(xué)生所學(xué)專(zhuān)業(yè)系分?jǐn)?shù)表說(shuō)明數(shù)據(jù)項(xiàng)編號(hào)數(shù)據(jù)項(xiàng)名稱數(shù)據(jù)項(xiàng)含義數(shù)據(jù)類(lèi)型與存儲(chǔ)與其他數(shù)據(jù)關(guān)系別名m-01name學(xué)生varchar(50)同學(xué)生m-02code學(xué)號(hào)varchar(50)同學(xué)生編號(hào)學(xué)號(hào)m-03mathmark數(shù)學(xué)分?jǐn)?shù)int數(shù)學(xué)分

8、數(shù)m-04chinesemark語(yǔ)文分?jǐn)?shù)int語(yǔ)文分?jǐn)?shù)m-05psychologymark心理學(xué)分?jǐn)?shù)int心理學(xué)分?jǐn)?shù)m-06englishmark英語(yǔ)分?jǐn)?shù)int同教師英語(yǔ)分?jǐn)?shù)m-07grade所在班級(jí)varchar(60)同學(xué)生所在班級(jí)班級(jí)m-08major所在系varchar(50)同學(xué)生所在系系4. E-R模型圖登陸信息領(lǐng)導(dǎo)登陸管理登陸教師登陸學(xué)生教學(xué)成績(jī)課表查詢錄入教課用戶名密碼XX年齡性別工資系職位XX年齡性別系職位工資XX性別系班級(jí)年齡學(xué)號(hào)學(xué)號(hào)班級(jí)分?jǐn)?shù)課程類(lèi)型課程名課程名學(xué)分先行課季度授課教師系三、數(shù)據(jù)庫(kù)邏輯設(shè)計(jì)E-R圖轉(zhuǎn)換成的關(guān)系圖學(xué)生表說(shuō)明字段名含義說(shuō)明數(shù)據(jù)類(lèi)型空值情況主鍵情況c

9、ode學(xué)號(hào)varchar(30)否是name學(xué)生varchar(50)否否sexy學(xué)生性別nchar(1)是否age學(xué)生年齡int是否address家庭住址varchar(100)是否birthday生日datetime是否grade所在班級(jí)varchar(60)是否major所學(xué)專(zhuān)業(yè)varchar(50)是否教師表說(shuō)明字段名含義說(shuō)明數(shù)據(jù)類(lèi)型空值情況主鍵情況name教師varchar(30)否否code教師編號(hào)varchar(50)否是sexy教師性別nchar(1)是否age教師年齡int是否address家庭住址varchar(100)是否birthday生日datetime是否salar

10、y每月所得工資int是否major所教專(zhuān)業(yè)varchar(50)是否duty職稱varchar(50)是否領(lǐng)導(dǎo)表說(shuō)明字段名含義說(shuō)明數(shù)據(jù)類(lèi)型空值情況主鍵情況name領(lǐng)導(dǎo)varchar(30)否否code領(lǐng)導(dǎo)編號(hào)varchar(50)否是sexy領(lǐng)導(dǎo)性別nchar(1)是否age領(lǐng)導(dǎo)年齡int是否address家庭住址varchar(100)是否birthday生日datetime是否salary每月所得工資int是否major所在院系varchar(50)是否duty職稱varchar(50)是否課程表說(shuō)明字段名含義說(shuō)明數(shù)據(jù)類(lèi)型空值情況主鍵情況name課程名稱varchar(30)否否code課

11、程號(hào)varchar(50)否是credit所得學(xué)分int是否precourse先行課varchar(50)是否quarter上課季度varchar(50)是否teachername授課教師名varchar(50)是否studentnumber所容納學(xué)生數(shù)int是否classnumber教室號(hào)int否否grade上課的班級(jí)varchar(50)是否major上課學(xué)生所在院系varchar(50)是否分?jǐn)?shù)表說(shuō)明字段名含義說(shuō)明數(shù)據(jù)類(lèi)型空值情況主鍵情況name學(xué)生varchar(50)否否code學(xué)號(hào)varchar(50)否是mathmark數(shù)學(xué)分?jǐn)?shù)int是否chinesemark語(yǔ)文分?jǐn)?shù)int是否p

12、sychologymark心理學(xué)分?jǐn)?shù)int是否englishmark英語(yǔ)分?jǐn)?shù)int是否grade所在班級(jí)varchar(60)是否major所在系varchar(50)是否四、軟件功能設(shè)計(jì)教學(xué)管理系統(tǒng)學(xué)生信息管理系統(tǒng)學(xué)生分?jǐn)?shù)系統(tǒng)學(xué)生課程系統(tǒng)教師信息系統(tǒng)領(lǐng)導(dǎo)信息系統(tǒng)學(xué)生信息刪除學(xué)生信息更新學(xué)生信息添加教師信息添加教師信息刪除教師信息更新領(lǐng)導(dǎo)信息更新領(lǐng)導(dǎo)信息更新領(lǐng)導(dǎo)信息更新課程修改課程信息查詢分?jǐn)?shù)查詢分?jǐn)?shù)修改五、程序源代碼(注:實(shí)際應(yīng)用系統(tǒng)為英文版,java語(yǔ)言編寫(xiě))1.程序中類(lèi)的設(shè)計(jì):Course_Frame:這個(gè)是學(xué)生信息系統(tǒng)添加信息框架類(lèi)courseBean:實(shí)現(xiàn)基本方法的課程類(lèi)course

13、manageframe:學(xué)生課程表信息系統(tǒng)的入口框架類(lèi)From_course:課程表存儲(chǔ)類(lèi)From_Leader:領(lǐng)導(dǎo)存儲(chǔ)類(lèi)From_mark:學(xué)生表存儲(chǔ)類(lèi)From_student:學(xué)生存儲(chǔ)類(lèi)From_Teacher:教師存儲(chǔ)類(lèi)Leader_Frame:領(lǐng)導(dǎo)添加信息框架類(lèi)leaderBean:領(lǐng)導(dǎo)類(lèi)模型leadermanageframe:領(lǐng)導(dǎo)信息系統(tǒng)的入口框架類(lèi)login:登陸界面類(lèi)Mark_Frame:學(xué)生分?jǐn)?shù)添加信息框架類(lèi)markBean:實(shí)現(xiàn)基本方法的分?jǐn)?shù)表類(lèi)markmanageframe:學(xué)生分?jǐn)?shù)表信息系統(tǒng)入口框架類(lèi)PDA_Frame:主界面類(lèi),實(shí)現(xiàn)各個(gè)系統(tǒng)界面Show_Course:

14、學(xué)生課程系統(tǒng)框架類(lèi)Show_Leader:領(lǐng)導(dǎo)信息系統(tǒng)框架類(lèi)Show_Mark:學(xué)生分?jǐn)?shù)系統(tǒng)框架類(lèi)Show_Student:學(xué)生信息系統(tǒng)框架類(lèi)Show_Teacher:教師信息系統(tǒng)框架類(lèi)Student_Frame:學(xué)生添加信息框架類(lèi)studentBean:學(xué)生類(lèi)模型studentmanageframe:學(xué)生信息系統(tǒng)的入口框架類(lèi)Teacher_Frame:教師添加信息框架類(lèi)teacherBean:教師類(lèi)模型teachermanageframe:教師信息系統(tǒng)的入口框架類(lèi)2.程序中各個(gè)類(lèi)的核心代碼(由于代碼比較多,所以在此只寫(xiě)出了一些核心代碼,由于有些類(lèi)小異,比如學(xué)生類(lèi),老師類(lèi)和領(lǐng)導(dǎo)類(lèi)等,其中一些類(lèi)

15、以學(xué)生類(lèi)為例子):1.程序中類(lèi)的設(shè)計(jì):public class login extends JPanel static final int WIDTH = 400;static final int HEIGHT = 250;JFrame loginframe;public static void main(String args) login log = new login();public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x

16、;constraints.gridy = y;constraints.gridwidth = w;constraints.gridheight = h;add(c, constraints); login() loginframe = new JFrame("HeBei United University Teaching Management System");loginframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);GridBagLayout lay = new GridBagLayout();setLayout

17、(lay);loginframe.add(this, BorderLayout.WEST);loginframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;loginframe.setLoc

18、ation(x, y);utton ok = new utton("Login");utton cancel = new utton("Give up");JLabel title = new JLabel("Administrator login");JLabel name = new JLabel("Administrator name");JLabel password = new JLabel("Password");final JTextField nameinput = new JT

19、extField(15);final JTextField passwordinput = new JPasswordField(15);GridBagConstraints constraints = new GridBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 3;constraints.weighty = 4;add(title, constraints, 0, 0, 4, 1);

20、/ 使用網(wǎng)格組布局添加控件add(name, constraints, 0, 1, 1, 1);add(password, constraints, 0, 2, 1, 1);add(nameinput, constraints, 2, 1, 1, 1);add(passwordinput, constraints, 2, 2, 1, 1);add(ok, constraints, 1, 3, 1, 1);add(cancel, constraints, 2, 3, 1, 1);loginframe.setResizable(true);loginframe.setVisible(true);o

21、k.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String nametext = nameinput.getText();String passwordtext = passwordinput.getText();String str = new String(passwordtext);boolean x = (nametext.equals("江");boolean y = (str.equals("333"); / 在此

22、設(shè)置密碼和用戶名boolean z = (x && y);if (z = true) loginframe.dispose();PDA_Frame main = new PDA_Frame(); / 此界面就是后面的主界面System.out.println("welcome to Teaching Management System!"); else if (z = false) nameinput.setText("");passwordinput.setText(""););cancel.addActionLis

23、tener(new ActionListener() public void actionPerformed(ActionEvent Event) loginframe.dispose(););class PDA_Frame extends JFrame static final int WIDTH = 400;static final int HEIGHT = 200;JFrame buttonframe;public PDA_Frame() buttonframe = new JFrame();buttonframe.setTitle("Teaching Management S

24、ystem");buttonframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);buttonframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HE

25、IGHT) / 2;this.setBackground(Color.red);buttonframe.setLocation(x, y);buttonframe.setVisible(true);buttonframe.setForeground(Color.blue);utton student = new utton("Student information management system");utton mark = new utton("Student mark system");utton course = new utton("

26、;Student course system");utton teacher = new utton("Teacher information system");utton leader = new utton("Leader information system");buttonframe.add(student);buttonframe.add(mark);buttonframe.add(course);buttonframe.add(teacher);buttonframe.add(leader);buttonframe.setLayou

27、t(new GridLayout(5, 1);student.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) studentmanageframe studentframe = new studentmanageframe(););teacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) teachermanageframe teacherfr

28、ame = new teachermanageframe(););leader.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) leadermanageframe leaderframe = new leadermanageframe(););mark.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) markmanageframe markframe

29、 = new markmanageframe(););course.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) coursemanageframe courseframe = new coursemanageframe(););class studentmanageframe extends JPanel private static final long serialVersionUID = 1L;static final int WIDTH = 400;stati

30、c final int HEIGHT = 200;JFrame studentframe;public studentmanageframe() studentframe = new JFrame();studentframe.setBackground(Color.black);studentframe.setTitle("Student informatin management system");studentframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);studentframe.setSize(WIDTH,

31、 HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;studentframe.setLocation(x, y);studentframe.setVisible(true);studentframe.setResizable(f

32、alse);studentframe.add(this, BorderLayout.CENTER);utton computerone = new utton("Computer No.1");utton computertwo = new utton("Computer No.2");utton computerthree = new utton("Computer No.3");utton bioone = new utton("Legal No.1");utton mechone = new utton(&q

33、uot;Legal No.2");utton mechtwo = new utton("Mathematics No.1");utton mechthree = new utton("Mathematics No.2");JLabel banket1 = new JLabel();JLabel banket2 = new JLabel();GridBagLayout lay = new GridBagLayout();setLayout(lay);GridBagConstraints constraints = new GridBagConst

34、raints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 2;constraints.weighty = 5;JPanel jp = new JPanel();jp.setLayout(new GridLayout(1, 3);jp.add(banket1);jp.add(banket2);studentframe.add(jp, BorderLayout.NORTH);add(computerone, constr

35、aints, 0, 1, 1, 1);add(computertwo, constraints, 0, 2, 1, 1);add(computerthree, constraints, 0, 3, 1, 1);add(bioone, constraints, 0, 4, 1, 1);add(mechone, constraints, 1, 1, 1, 1);add(mechtwo, constraints, 1, 2, 1, 1);add(mechthree, constraints, 1, 3, 1, 1);/ /單擊這個(gè)按鈕,進(jìn)入到計(jì)算機(jī)系二班學(xué)生信息系統(tǒng)computerone.addAc

36、tionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade='一班' and major='計(jì)算機(jī)系'"Show_Student info = new Show_Student("sutdent basic information 0f computer No.1 ", sql););/ /單擊這個(gè)按鈕,進(jìn)入到計(jì)算機(jī)系二

37、班學(xué)生信息系統(tǒng)computertwo.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade='二班'and major='計(jì)算機(jī)系'"Show_Student studentinformation = new Show_Student("sutdent basic information 0f computer N

38、o.2",sql););/ /單擊這個(gè)按鈕,進(jìn)入到計(jì)算機(jī)系三班學(xué)生信息系統(tǒng)computerthree.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade='三班' and major='計(jì)算機(jī)系'"Show_Student studentinformation = new Show_Student("s

39、utdent basic information 0f computer No.3",sql););/ /單擊這個(gè)按鈕,進(jìn)入到法律系一班學(xué)生信息系統(tǒng)bioone.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade ='一班'and major='法律系'"Show_Student studentinformati

40、on = new Show_Student("sutdent basic information 0f legal No.1",sql););/ /單擊這個(gè)按鈕,進(jìn)入到法律系二班學(xué)生信息系統(tǒng)mechone.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade='二班'and major='法律系'"Sho

41、w_Student studentinformation = new Show_Student("sutdent basic information 0f legal No.2",sql););/ /單擊這個(gè)按鈕,進(jìn)入數(shù)學(xué)系一班學(xué)生信息系統(tǒng)mechtwo.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo where grade='一班'and maj

42、or='數(shù)學(xué)系'"Show_Student studentinformation = new Show_Student("sutdent basic information 0f mathematics No.1",sql););/ /單擊這個(gè)按鈕,數(shù)學(xué)系二班學(xué)生信息系統(tǒng)mechthree.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from studentinfo

43、where grade='二班'and major='數(shù)學(xué)系'"Show_Student studentinformation = new Show_Student("sutdent basic information 0f mathematics No.2",sql););public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x;constraints.gridy = y

44、;constraints.gridwidth = w;constraints.gridheight = h;add(c, constraints);class teachermanageframe extends JPanel private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame teacherframe;public teachermanageframe() teacherframe = new JFrame();tea

45、cherframe.setTitle("Teacher information management system");teacherframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);teacherframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenS

46、ize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;teacherframe.setLocation(x, y);teacherframe.setVisible(true);teacherframe.setResizable(false);teacherframe.add(this, BorderLayout.CENTER);utton computerteacher = new utton("Computer department");utton bioteacher = new utt

47、on("Legal department");utton mechteacher = new utton("Mathematics department");utton beretun = new utton("Return");JLabel banket1 = new JLabel();JLabel banket2 = new JLabel();GridBagLayout lay = new GridBagLayout();setLayout(lay);GridBagConstraints constraints = new Gri

48、dBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 1;constraints.weighty = 4;JPanel jp = new JPanel();jp.setLayout(new GridLayout(1, 3);jp.add(banket1);jp.add(banket2);teacherframe.add(jp, BorderLayout.NORTH);add(computerte

49、acher, constraints, 0, 1, 1, 1);add(bioteacher, constraints, 0, 4, 1, 1);add(mechteacher, constraints, 1, 1, 1, 1);/ /單擊這個(gè)按鈕,進(jìn)入到計(jì)算機(jī)系教師信息系統(tǒng)computerteacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from teacherinfo where duty = &#

50、39;教師' and major='計(jì)算機(jī)系'"/ String sql="select * from teacherinfo where duty='教師'and/ major='英語(yǔ)系'"Show_Teacher teacherinformation = new Show_Teacher("Computer department teacher information system",sql););/ /單擊這個(gè)按鈕,進(jìn)入到法律系教師信息系統(tǒng)bioteacher.addActionLi

51、stener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from teacherinfo where duty = '教師' and major='法律系'"Show_Teacher teacherinformation = new Show_Teacher("Legal department teacher information system",sql););/ /單擊這個(gè)按鈕,進(jìn)入到數(shù)學(xué)系教師信息系統(tǒng)mechteacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = "select * from teacherinfo where duty = '教師' and major='數(shù)學(xué)系'"Show_Teacher teacherinformation = new Show_Teacher("Mathematics d

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論