版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、軟件工程綜合實驗學(xué)生姓名袁春艷學(xué)號1018014081班級計本103班成績指導(dǎo)教師曹陽數(shù)學(xué)與計算機科學(xué)學(xué)院2012年12月3日目錄第一章 緒 論 11.1 設(shè)計目的 11.2 開發(fā)工具選擇 11.3 開發(fā)環(huán)境 1第二章 需求分析 22.1 系統(tǒng)需求簡介 22.1.1 問題定義 22.1.2 功能需求分析 22.1.3 性能需求分析 22.1.4 用戶需求 2第三章 總體設(shè)計 53.1 設(shè)計概述 53.2 系統(tǒng)數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計 53.2.1 系統(tǒng) E-R 圖 53.2.2 系統(tǒng)數(shù)據(jù)設(shè)計 63.3 安全保密設(shè)計 6第四章 實現(xiàn) 84.1 程序代碼 84.2 程序運行結(jié)果 31第五章 課程設(shè)計心得
2、 34學(xué)生成績管理系統(tǒng)第一章 緒論1.1設(shè)計目的通過本實驗掌握軟件工程 SA或00A需求分析方法和技術(shù)。要求做到使用結(jié)構(gòu)化數(shù)據(jù) 流分析技術(shù)或面向?qū)ο蠓治黾夹g(shù)分析教學(xué)管理系統(tǒng)需求,寫出詳細的數(shù)據(jù)流圖和數(shù)據(jù)字典。1.2開發(fā)工具選擇開發(fā)工具:計算機、“ C+編程環(huán)境”或者“ JAVA編程環(huán)境”、SQL Server 2000、文檔 編輯器(MS、WORD )、畫圖工具(viso)。1.3開發(fā)環(huán)境學(xué)生成績管理系統(tǒng)運行環(huán)境要求: 操作系統(tǒng): wi ndows 2000/XP/w in dows 7 數(shù)據(jù)庫管理系統(tǒng):SQL server 2000 硬件需求:內(nèi)存 256M以上第二章需求分析2.1系統(tǒng)需求簡
3、介問題定義本系統(tǒng)需進行學(xué)生成績管理,主要用戶有:管理員、學(xué)生、教師。各用戶具體需操作的 功能如下: 管理員,登陸,進入系統(tǒng),可進行管理員操作,進行查詢、刪除、修改、添加、打 印等操作。 學(xué)生,登陸,進入系統(tǒng),可進行查詢、修改、打印等操作。 教師,登陸,進入系統(tǒng),可進行查詢、學(xué)生成績錄入、修改、打印等操作。功能需求分析本系統(tǒng)的功能需求分析如下: 學(xué)生信息查詢:學(xué)生可以根據(jù)學(xué)號、姓名、專業(yè)進行查詢 學(xué)生信息管理:主要是用于學(xué)生信息更新、插入、刪除; 學(xué)生成績錄入:用于學(xué)生成績管理,錄入學(xué)生成績,也可以更新;性能需求分析 登錄、用戶界面需求:簡潔、易懂、易用、友好的用戶界面。 安全保密性需求:只有憑
4、借用戶名和密碼登陸系統(tǒng),才能進行信息的管理等。用戶需求刪除, 本系統(tǒng)具有很強的可靠性、可對錄入的學(xué)生信息進行校驗,對數(shù)據(jù)進行修改、規(guī)定各種權(quán)限。 本系統(tǒng)中的模塊要求很強的可持續(xù)性,可以方便管理人員的修改與維護。 本系統(tǒng)操作方便、靈活、高效。 本系統(tǒng)課高效、快速的查詢學(xué)生的基本信息。查詢條件返回信息學(xué)生查詢結(jié)果學(xué)生成績- 管理系統(tǒng)*.學(xué)生信息、課程信息、 教師信息管理員學(xué)生條件1.查詢杳詢)返回信息返 回 信 息成 績 信 息教師頂層數(shù)據(jù)流圖學(xué)生信息管理員課程信息、教師 信息成績信息教師返回信息課程信息成績信息表學(xué)生信息2.學(xué)生管 理3.課程管 理4.成績管 理學(xué)生成績信息圖2零層數(shù)據(jù)流圖圖3
5、一層數(shù)據(jù)流圖返回信息返 回 信 息圖4二層數(shù)據(jù)流圖學(xué)生成績信息第三章總體設(shè)計3.1設(shè)計概述每個模塊完成一個特定的子功能。把這些模塊根據(jù)需求把整個系統(tǒng)分化成不同的模塊, 結(jié)合起來組成一個整體。逐一實現(xiàn)各個功能。3.2系統(tǒng)數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計根據(jù)對數(shù)據(jù)項與數(shù)據(jù)結(jié)構(gòu)的分析,設(shè)計出能夠滿足系統(tǒng)需求的各種實體,及它們之間的關(guān)系,為后面的邏輯結(jié)構(gòu)設(shè)計打下基礎(chǔ)。系統(tǒng)E-R圖322系統(tǒng)數(shù)據(jù)設(shè)計department_tabl冒 numbern ameinclass table曾 numbefnamedEpatmenta -<“:-(*)Fcourse indassscore table$ stjjdent_
6、numbe 冒 coursenumber score tead"ier_number tErm匕QCaccount table? iduserNamepassi ordpermissioncon rsetableg numbername圖6數(shù)據(jù)庫關(guān)系圖3.3安全保密設(shè)計系統(tǒng)設(shè)計了登錄界面, 每個合法用戶有用戶名及一個密碼,只有當(dāng)用戶輸入正確的用戶 名及密碼組合后才能夠?qū)W(xué)生信息進行操作。登陸退出圖7登陸界面1 -1|(ij 燮陸咸功V圖8登陸成功界面第四章實現(xiàn)4.1程序代碼package api;import java.util.List; mport doma in. Acco u
7、nt;import doma in. Stude nt; import doma in. Teacher;public in terface IAcco un tDaoAcco unt fin dAcco un t(Stri ng userName, String password); boolea n isUserd(Stri ng userName);Stude nt fin dStude nt(Acco unt acco un t);Teacher fin dTeacher(Acco unt acco un t);Acco unt fin dAcco un t(Stude nt stud
8、e nt);Acco unt fin dAcco un t(Teacher teacher);void deleteAcco un t(Stude nt stude nt,Acco unt acco un t); void deleteAcco un t(Teacher teacher,Acco unt acco un t); void addAcco un t(Stude nt stude nt,Acco unt acco un t); void addAcco un t(Teacher teacher,Acco unt acco un t); void updateAcco un t(St
9、ude nt stude nt,Acco unt acco un t); void updateAcco un t(Teacher teacher,Acco unt acco un t); package api;import java.util.List;import doma in. Acco unt;import doma in. Stude nt; import doma in. Teacher;public in terface IAcco un tServiceAcco unt logi n( Stri ng userName, String password);Stude nt
10、fin dStude nt(Acco unt acco un t); Teacher fin dTeacher(Acco unt acco un t); Acco unt fin dAcco un t(Stude nt stude nt); Acco unt fin dAcco un t(Teacher teacher);void removeAcco un t(Stude nt stude nt,Acco unt acco un t); void removeAcco un t(Teacher teacher,Acco unt acco un t); void addAcco un t(St
11、ude nt stude nt,Acco unt acco un t); void addAcco un t(Teacher teacher,Acco unt acco un t); void updateAcco un t(Stude nt stude nt,Acco unt acco un t); void updateAcco un t(Teacher teacher,Acco unt acco un t);package sgm.ui;import javax.swi ng.JOptio nPane;import doma in. Acco unt;import api.lAcco u
12、n tService;import service.Acco un tService;public class Logi nWindow exte nds javax.sw in g.JFrameprivate IAcco un tService acco un tService;public Logi nWin dow(IAcco un tService acco un tService)in itComp onen ts();setLocati on RelativeTo (n ull);this.acco un tService = acco un tService;private vo
13、id in itComp onen ts() private void userNameTextActio nPeformed(java.awt.eve nt.Actio nEve nt evt) private void exitButt onAction Performed(java.awt.eve nt.Act ionEvent evt) System.exit(O);private void log in Butt on Acti on Performed(java.awt.eve nt.Act ion Eve nt evt) Stri ng userName = userNameTe
14、xt.getText().trim();String password = Strin g.valueOf(passwordText.getPassword();if ("".equals(userName) JOptionPane.showMessageDialog(this,"輸入的用戶名不能為空!");return;if ("".equals(password) JOptionPane.showMessageDialog(this,"輸入的密碼不能為空!");return;try Acco unt acco
15、unt = acco un tServiceogin( userName, password);JOptionPane.showMessageDialog(this,"登陸成功! ”); this.setVisible(false);new MainWindow(account).setVisible(true); catch (Excepti on e) JOptio nPan e.showMessageDialog(this, e.getMessage();private javax.swing.JButton exitButton;private javax.swi ng.JL
16、abel jLabel1;private javax.sw in g.JLabel jLabel2;private javax.swing.JButton loginButton;private javax.swing.JPasswordField passwordText;private javax.swi ng.JTextField userNameText;package sgm.ui;import java.awt.Color;import java.awt.eve nt.Act ion Eve nt;import javax.swi ng.*;import domai n.*;imp
17、ort factory.Factory;import api.IAcco un tService;import sgm.ma nager.ui.*;import sgm.stude nt.ui.Stude ntl nfoDialog;import sgm.stude nt.ui.Stude ntQueryScoreDialog;import sgm.teacher.ui.TeacherI nfoDailog;import sgm.teacher.ui.TeacherI nputScoreDialog;public class Mai nWin dow exte nds javax.swi ng
18、.JFrame private Acco unt acco unt;private Action allStudentsInfoAction;private Acti on allTeachers In foAct ion;private Action allAccountsAction;private Acti on allScoreAct ion;private Acti on allCourseActi on;private Acti on choiceCourseActi on;private Acti on stude nln foAct ion;private Acti on st
19、ude ntQueryScoreAct ion;private Acti on teacherI nfoAct ion;private Acti on teacherI nputAct ion; private Acti on exitAct ion;public Mai nWin dow(Acco unt acco unt)this.setSize(800, 600);setTitle(”學(xué)生成績管理系統(tǒng)首頁”); setDefaultCloseOperati on (EXIT_ON_CLOSE); setLocati on RelativeTo (n ull);this.acco unt
20、= acco unt;JLabel label = new JLabel( new ImageIc on ("image/s un set.jpg"); this.add(label);createAct ion s(); setPermissi on();private void setPermissi on()int permissi on = accou nt.getPermissio n();if (permissi on = 1) JMe nuBar bar = new JMe nuBar();JMenu menu1 = new JMenu(” 基本信息管理”);
21、men u1.add(stude ntQueryScoreActi on);bar.add(me nul);this.setJMe nuBar(bar);if (permissi on = 2) JMe nuBar bar = new JMe nuBar();JMenu menu1 = new JMenu(” 基本信息管理”);men u1.add(teacherl nfoAct ion);men u1.add(teacherl nputActi on);bar.add(me nu1);this.setJMe nuBar(bar);if (permissi on = 3) JMe nuBar
22、bar = new JMe nuBar();JMenu menu1 = new JMenu(” 基本信息管理”);men u1.add(allStude ntsln foActi on);men u1.add(allTeachersl nfoActio n);men u1.add(allCourseActio n);men u1.add(allAcco un tsActio n);bar.add(me nu1);JMenu menu2 = new JMenu(” 選課管理”);menu 2.add(choiceCourseAct ion);bar.add(me nu 2);JMenu menu
23、3 = new JMenu("系統(tǒng)管理");men u3.add(exitActi on);bar.add(me nu 3);this.setJMe nuBar(bar);private void createActi on s() exitAction =new AbstractAction(” 安全退出")Overridepublic void action Performed(Acti onEvent e) System.exit(0);allStudentslnfoAction = new AbstractAction(” 學(xué)生信息管理")Ove
24、rridepublic void action Performed(Acti onEvent e) AllStuden ts In foDialog dialog = new AllStude ntsl nfoDialog(Mai nWin dow.this);dialog.setVisible(true);allTeachersInfoAction = new AbstractAction(” 教師信息管理") Overridepublic void action Performed(Acti onEvent e) AllTeachers In foDialog dialog =
25、new AllTeachers In foDialog(Mai nWin dow.this);dialog.setVisible(true);allCourseAction = new AbstractAction(” 課程信息管理")Overridepublic void action Performed(Acti onEvent e) AllCourses In foDialog dialog = new AllCoursesI nfoDialog(Mai nWin dow.this);dialog.setVisible(true);allAccountsAction = new
26、 AbstractAction(” 賬戶管理")Overridepublic void action Performed(Acti onEvent e) Acco un tI nfoDialog dialog = new Acco untln foDialog(Mai nWin dow.this);dialog.setVisible(true);allScoreAction = new AbstractAction(” 成績管理")Overridepublic void action Performed(Acti onEvent e) JOptio nPan e.showM
27、essageDialog(Mai nWin dow.this,"成績管理功能還沒實 現(xiàn)! ”);;choiceCourseAction = new AbstractAction(” 選課管理")Overridepublic void action Performed(Acti onEvent e) ChoiceCourseDialog dialog = new ChoiceCourseDialog(Mai nWin dow.this);dialog.setVisible(true);stude nln foAction = new AbstractActio n(” 基本信
28、息")Overridepublic void action Performed(Acti onEvent e) Stude nt stude nt = Factory.createAcco un tService().fi ndStude nt(acco un t);Stude ntl nfoDialog dialog = new Stude ntln foDialog(Mai nWin dow.this, stude nt);dialog.setVisible(true);studentQueryScoreAction = new AbstractAction(” 查看成績&quo
29、t;)Overridepublic void action Performed(Acti onEvent e) Stude nt stude nt = Factory.createAcco un tService().fi ndStude nt(acco un t);Stude ntQueryScoreDialog dialog = new Stude ntQueryScoreDialog(Mai nWin dow.this, stude nt);dialog.setVisible(true);teacherInfoAction = new AbstractAction(” 基本信息"
30、;)Overridepublic void action Performed(Acti onEvent e) Teacher teacher = Factory.createAcco un tService().fi ndTeacher(acco un t);TeacherI nfoDailog dialog = new TeacherI nfoDailog(MainWin dow.this, teacher);dialog.setVisible(true);teacherInputAction = new AbstractAction(” 錄入成績 ")Overridepublic
31、 void action Performed(Acti onEvent e) Teacher teacher = Factory.createAcco un tService().fi ndTeacher(acco un t);if(Factory.createChoiceCourseService().fi ndIn class(teacher).isEmpty()JOptio nPa ne.showMessageDialog(Mai nWin dow.this,"錄入成績功能未 開通!");return;TeacherI nputScoreDialog dialog =
32、 new TeacherI nputScoreDialog(MainWin dow.this, teacher);dialog.setVisible(true);package doma in;public class Acco unt private int id;private String userName;private String password;private int permissi on;public Account(int id, String name, String password, int permission) this.id = id;this.userNam
33、e = n ame;this.password = password;this.permissi on = permissi on;public in t getId() return id;public void setld(i nt id) this.id = id;public String getName() return userName;public void setName(Stri ng n ame) this.userName = n ame;public String getPassword() retur n password;public void setPasswor
34、d(Stri ng password) this.password = password;public int getPermissi on() retur n permissi on;public void setPermissi on (i nt permissi on) this.permissi on = permissi on;Override public int hashCode() final int prime = 31; int result = 1;result = prime * result + id; return result;Overridepublic boo
35、lea n equals(Object obj) if (this = obj) return true;if (obj = nu II) return false;if (getClass() != obj.getClass() return false;Acco unt other = (Acco unt) obj; if (id != other.id)return false;return true;package doma in;public class Course private int nu mber; private String name;public Course(int
36、 number, String name) super();this .nu mber = nu mber; this. name = n ame;public int getNumber() retur n nu mber;public void setNumber(i nt nu mber) this .nu mber = nu mber;public String getName() return n ame;public void setName(Stri ng n ame) this. name = n ame;Overridepublic int hashCode() final
37、int prime = 31;int result = 1;result = prime * result + nu mber; return result;Overridepublic boolea n equals(Object obj) if (this = obj) return true;if (obj = nu II)return false;if (getClass() != obj.getClass()return false;Course other = (Course) obj;if (nu mber != other. nu mber) return false;retu
38、rn true;Overridepublic Stri ng toStri ng()return n ame;package doma in;public class Score private String stude nt_nu mber;private int course_number;private int score;private String teacher_ nu mber;private String term;public Score(Stri ng stude nt_nu mber, i nt course_ nu mber, i nt score, String te
39、acher_ nu mber, String term) this.stude nt_nu mber = stude nt_nu mber;this.course_ nu mber = course_ nu mber;this.score = score;this.teacher_ nu mber = teacher_ nu mber; this.term = term;public String getStude nt_nu mber() retur n stude nt_nu mber;public void setStude nt_nu mber(Stri ng stude nt_nu
40、mber) this.stude nt_nu mber = stude nt_nu mber;public int getCourse_ nu mber() retur n course_ nu mber;public void setCourse_ nu mber(i nt course_ nu mber) this.course_ nu mber = course_ nu mber;public int getScore() retur n score;public void setScore(i nt score) this.score = score;public String get
41、Teacher_ nu mber() retur n teacher_ nu mber;public void setTeacher_ nu mber(Stri ng teacher_ nu mber) this.teacher_ nu mber = teacher_ nu mber;public String getTerm() return term;public void setTerm(Stri ng term) this.term = term;Overridepublic int hashCode() final int prime = 31;int result = 1;resu
42、lt = prime * result + course_ nu mber;result = prime * result+ (stude nt_nu mber = n ull) ? 0 : stude nt_nu mber.hashCode(); return result;Overridepublic boolea n equals(Object obj) if (this = obj)return true;if (obj = nu II)return false;if (getClass() != obj.getClass()return false;Score other = (Sc
43、ore) obj;if (course_ nu mber != other.course_ nu mber)return false;if (stude nt_nu mber = n ull) if (other.stude nt_nu mber != n ull) return false; else if (!stude nt_nu mber.equals(other.stude nt_nu mber)return false;return true;package doma in;public class Stude nt private String number;private St
44、ring name;private String sex;private int age;private Departme nt departme nt;private String pho neNumber;private Stri ng IdCardNo;private In class in class;private String homeAddress;public Student(String number, String name, String sex, int age,Departme nt departme nt. String pho neNumber, String i
45、dCardNo, In class in class, String homeAddress) this .nu mber = nu mber;this. name = n ame;this.sex = sex;this.age = age; this.departme nt = departme nt;this.ph on eNumber = pho neNumber;IdCardNo = idCardNo;this.i nclass = in class; this.homeAddress = homeAddress;public String getNumber() retur n nu
46、 mber;public void setNumber(Stri ng nu mber) this .nu mber = nu mber;public String getName() return n ame;public void setName(Stri ng n ame) this. name = n ame;public Stri ng getSex() return sex;public void setSex(Stri ng sex) this.sex = sex;public int getAge() return age;public void setAge(i nt age
47、) this.age = age;public Departme nt getDepartme nt() retur n departme nt;public void setDepartme nt(Departme nt departme nt) this.departme nt = departme nt;public String getPh on eNumber() retur n phon eNumber;public void setPh on eNumber(Stri ng pho neNumber) this.ph on eNumber = pho neNumber;publi
48、c String getldCardNo() return IdCardNo;public void setldCardNo(Stri ng idCardNo) IdCardNo = idCardNo;public In class get In class() retur n in class;public void set In class(I nclass in class) this.i nclass = in class;public String getHomeAddress() retur n homeAddress;public void setHomeAddress(Stri
49、 ng homeAddress) this.homeAddress = homeAddress; package factory;import java.util.List; import dao.Acco un tDao;import dao.ChoiceCourseDao;import dao.CourseDao;import dao.Departme ntDao;import dao.ln classDao;import dao.ScoreDao;import dao.Stude ntDao;import dao.TeacherDao;import doma in .Departme n
50、t;import doma in.ln class;import api.IAcco un tDao;import api.IAcco un tService;import api.IChoiceCourseDao;import api.IChoiceCourseService;import api.ICourseDao;import api.ICourseService;import api.IDeparme ntDao;import api.IDepartme ntService;import api.II nclassDao;import api.II nclassService;imp
51、ort api.IScoreDao;import api.IScoreService;import api.IStude ntDao;import api.IStude ntService;import api.ITeacherDao;import api.ITeacherService;import service.Acco un tService;import service.ChoiceCourseService; import service.CourseService;import service.Departme ntService; import service .In clas
52、sService;import service.ScoreService;import service.Stude ntService; import service.TeacherService; public class Factory private static IAcco un tDao acco un tDao = new Acco un tDao();private static IStude ntDao stude ntDao = new Stude ntDao();private static IStude ntService stude ntService = new St
53、ude ntService( stude ntDao);private static IDeparme ntDao deparme ntDao = new Departme ntDao();private static IAcco un tService acco un tService = new Acco un tService( acco un tDao);private static IDepartme ntService departme ntService = new Departme ntService( deparme ntDao);private static Ilnclas
54、sDao inclassDao = new InclassDao();private static Iln classService in classService = new In classService(in classDao);private static ITeacherDao teacherDao = new TeacherDao();private static ITeacherService teacherService = new TeacherService( teacherDao);private static IScoreDao scoreDao = new ScoreDao();private static IScoreService scoreService =new ScoreService(i nclassService,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度環(huán)保技術(shù)改造項目合同3篇
- 2025版煤炭物流倉儲一體化服務(wù)合同模板4篇
- 2024珠寶銷售合同
- 2025年度高新技術(shù)企業(yè)研發(fā)費用加計扣除代理合同3篇
- 2025年度銷售合同信息共享與部門協(xié)同辦公2篇
- 2025年度XX農(nóng)業(yè)廢棄物資源化利用與污水處理合同3篇
- 2024水電站電力輸出及銷售合同協(xié)議
- 2025年度環(huán)保型廠房出租與能源管理一體化服務(wù)合同3篇
- 二零二五年齡上限勞動合同規(guī)范樣本2篇
- 二零二五年度風(fēng)景名勝區(qū)草坪修剪與修復(fù)合同3篇
- MT/T 199-1996煤礦用液壓鉆車通用技術(shù)條件
- GB/T 6144-1985合成切削液
- GB/T 10357.1-2013家具力學(xué)性能試驗第1部分:桌類強度和耐久性
- 第三方在線糾紛解決機制(ODR)述評,國際商法論文
- 第5章-群體-團隊溝通-管理溝通
- 腎臟病飲食依從行為量表(RABQ)附有答案
- 深基坑-安全教育課件
- 園林施工管理大型園林集團南部區(qū)域養(yǎng)護標(biāo)準(zhǔn)圖例
- 排水許可申請表
- 低血糖的觀察和護理課件
- 計量檢定校準(zhǔn)技術(shù)服務(wù)合同協(xié)議書
評論
0/150
提交評論