學(xué)生成績(jī)管理系統(tǒng)課程設(shè)計(jì)報(bào)告_第1頁(yè)
學(xué)生成績(jī)管理系統(tǒng)課程設(shè)計(jì)報(bào)告_第2頁(yè)
學(xué)生成績(jī)管理系統(tǒng)課程設(shè)計(jì)報(bào)告_第3頁(yè)
學(xué)生成績(jī)管理系統(tǒng)課程設(shè)計(jì)報(bào)告_第4頁(yè)
學(xué)生成績(jī)管理系統(tǒng)課程設(shè)計(jì)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩31頁(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í)驗(yàn)學(xué)生姓名 袁春艷學(xué)號(hào)1018014081班級(jí)計(jì)本103班成績(jī)指導(dǎo)教師曹陽(yáng) 數(shù)學(xué)與計(jì)算機(jī)科學(xué)學(xué)院 2012年 12月 3日目錄第一章 緒論11.1 設(shè)計(jì)目的11.2 開(kāi)發(fā)工具選擇11.3 開(kāi)發(fā)環(huán)境1第二章 需求分析22.1系統(tǒng)需求簡(jiǎn)介22.1.1問(wèn)題定義22.1.2功能需求分析22.1.3性能需求分析22.1.4用戶需求2第三章 總體設(shè)計(jì)53.1設(shè)計(jì)概述53.2系統(tǒng)數(shù)據(jù)庫(kù)概念結(jié)構(gòu)設(shè)計(jì)53.2.1系統(tǒng)E-R圖53.2.2系統(tǒng)數(shù)據(jù)設(shè)計(jì)63.3安全保密設(shè)計(jì)6第四章 實(shí)現(xiàn)84.1程序代碼84.2程序運(yùn)行結(jié)果31第五章 課程設(shè)計(jì)心得34*;學(xué)生成績(jī)管理系統(tǒng)第一章 緒論1.1 設(shè)計(jì)目的 通

2、過(guò)本實(shí)驗(yàn)掌握軟件工程SA或OOA需求分析方法和技術(shù)。要求做到使用結(jié)構(gòu)化數(shù)據(jù)流分析技術(shù)或面向?qū)ο蠓治黾夹g(shù)分析教學(xué)管理系統(tǒng)需求,寫出詳細(xì)的數(shù)據(jù)流圖和數(shù)據(jù)字典。1.2 開(kāi)發(fā)工具選擇 開(kāi)發(fā)工具:計(jì)算機(jī)、“C+編程環(huán)境”或者“JAVA編程環(huán)境”、SQL Server 2000、文檔編輯器(MS、WORD)、畫(huà)圖工具(viso)。1.3 開(kāi)發(fā)環(huán)境 學(xué)生成績(jī)管理系統(tǒng)運(yùn)行環(huán)境要求: 操作系統(tǒng):windows 2000/XP/windows 7 數(shù)據(jù)庫(kù)管理系統(tǒng):SQL server 2000 硬件需求:內(nèi)存256M以上第二章 需求分析2.1系統(tǒng)需求簡(jiǎn)介2.1.1問(wèn)題定義 本系統(tǒng)需進(jìn)行學(xué)生成績(jī)管理,主要用戶有:管

3、理員、學(xué)生、教師。各用戶具體需操作的功能如下: 管理員,登陸,進(jìn)入系統(tǒng),可進(jìn)行管理員操作,進(jìn)行查詢、刪除、修改、添加、打印等操作。 學(xué)生,登陸,進(jìn)入系統(tǒng),可進(jìn)行查詢、修改、打印等操作。 教師,登陸,進(jìn)入系統(tǒng),可進(jìn)行查詢、學(xué)生成績(jī)錄入、修改、打印等操作。2.1.2功能需求分析本系統(tǒng)的功能需求分析如下: 學(xué)生信息查詢:學(xué)生可以根據(jù)學(xué)號(hào)、姓名、專業(yè)進(jìn)行查詢. 學(xué)生信息管理:主要是用于學(xué)生信息更新、插入、刪除; 學(xué)生成績(jī)錄入:用于學(xué)生成績(jī)管理,錄入學(xué)生成績(jī),也可以更新;2.1.3性能需求分析 登錄、用戶界面需求:簡(jiǎn)潔、易懂、易用、友好的用戶界面。 安全保密性需求:只有憑借用戶名和密碼登陸系統(tǒng),才能進(jìn)行

4、信息的管理等。2.1.4用戶需求 本系統(tǒng)具有很強(qiáng)的可靠性、可對(duì)錄入的學(xué)生信息進(jìn)行校驗(yàn),對(duì)數(shù)據(jù)進(jìn)行修改、刪除,規(guī)定各種權(quán)限。 本系統(tǒng)中的模塊要求很強(qiáng)的可持續(xù)性,可以方便管理人員的修改與維護(hù)。 本系統(tǒng)操作方便、靈活、高效。 本系統(tǒng)課高效、快速的查詢學(xué)生的基本信息。 圖1 頂層數(shù)據(jù)流圖 圖2 零層數(shù)據(jù)流圖 圖3 一層數(shù)據(jù)流圖 圖4 二層數(shù)據(jù)流圖第三章 總體設(shè)計(jì)3.1設(shè)計(jì)概述根據(jù)需求把整個(gè)系統(tǒng)分化成不同的模塊,每個(gè)模塊完成一個(gè)特定的子功能。把這些模塊結(jié)合起來(lái)組成一個(gè)整體。逐一實(shí)現(xiàn)各個(gè)功能。3.2系統(tǒng)數(shù)據(jù)庫(kù)概念結(jié)構(gòu)設(shè)計(jì)根據(jù)對(duì)數(shù)據(jù)項(xiàng)與數(shù)據(jù)結(jié)構(gòu)的分析,設(shè)計(jì)出能夠滿足系統(tǒng)需求的各種實(shí)體,及它們之間的關(guān)系,為后

5、面的邏輯結(jié)構(gòu)設(shè)計(jì)打下基礎(chǔ)。3.2.1系統(tǒng)E-R圖課程表成績(jī)學(xué)號(hào)課程號(hào)號(hào)成績(jī)表選課學(xué)生表學(xué)號(hào)姓名生日系名總成績(jī)備注性別學(xué)分學(xué)生人數(shù)開(kāi)課時(shí)間課程名課程號(hào)考核系統(tǒng)E-R圖可以將各個(gè)實(shí)體之間的關(guān)系顯示出來(lái),將各個(gè)實(shí)體間的屬性依賴表示明白。如圖5系統(tǒng)E-R圖結(jié)構(gòu)。圖5系統(tǒng)E-R圖結(jié)構(gòu)3.2.2系統(tǒng)數(shù)據(jù)設(shè)計(jì)圖6數(shù)據(jù)庫(kù)關(guān)系圖3.3安全保密設(shè)計(jì)系統(tǒng)設(shè)計(jì)了登錄界面,每個(gè)合法用戶有用戶名及一個(gè)密碼,只有當(dāng)用戶輸入正確的用戶名及密碼組合后才能夠?qū)W(xué)生信息進(jìn)行操作。圖7 登陸界面圖8登陸成功界面第四章 實(shí)現(xiàn)4.1程序代碼package api;import java.util.List;mport domain.Ac

6、count;import domain.Student;import domain.Teacher;public interface IAccountDao Account findAccount(String userName, String password);boolean isUserd(String userName);Student findStudent(Account account);Teacher findTeacher(Account account);Account findAccount(Student student);Account findAccount(Tea

7、cher teacher);void deleteAccount(Student student,Account account);void deleteAccount(Teacher teacher,Account account);void addAccount(Student student,Account account);void addAccount(Teacher teacher,Account account);void updateAccount(Student student,Account account);void updateAccount(Teacher teach

8、er,Account account);package api;import java.util.List;import domain.Account;import domain.Student;import domain.Teacher;public interface IAccountService Account login(String userName, String password);Student findStudent(Account account);Teacher findTeacher(Account account);Account findAccount(Stude

9、nt student);Account findAccount(Teacher teacher);void removeAccount(Student student,Account account);void removeAccount(Teacher teacher,Account account);void addAccount(Student student,Account account);void addAccount(Teacher teacher,Account account);void updateAccount(Student student,Account accoun

10、t);void updateAccount(Teacher teacher,Account account);package sgm.ui;import javax.swing.JOptionPane;import domain.Account;import api.IAccountService;import service.AccountService;public class LoginWindow extends javax.swing.JFrame private IAccountService accountService; public LoginWindow(IAccountS

11、ervice accountService) initComponents();setLocationRelativeTo(null);this.accountService = accountService; private void initComponents() private void userNameTextActionPerformed(java.awt.event.ActionEvent evt) private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) System.exit(0); priv

12、ate void loginButtonActionPerformed(java.awt.event.ActionEvent evt) String userName = userNameText.getText().trim();String password = String.valueOf(passwordText.getPassword();if (.equals(userName) JOptionPane.showMessageDialog(this, 輸入的用戶名不能為空!);return;if (.equals(password) JOptionPane.showMessageD

13、ialog(this, 輸入的密碼不能為空!);return;try Account account = accountService.login(userName, password);JOptionPane.showMessageDialog(this, 登陸成功!);this.setVisible(false);new MainWindow(account).setVisible(true); catch (Exception e) JOptionPane.showMessageDialog(this, e.getMessage(); private javax.swing.JButto

14、n exitButton;private javax.swing.JLabel jLabel1;private javax.swing.JLabel jLabel2;private javax.swing.JButton loginButton;private javax.swing.JPasswordField passwordText;private javax.swing.JTextField userNameText;package sgm.ui;import java.awt.Color;import java.awt.event.ActionEvent;import javax.s

15、wing.*;import domain.*;import factory.Factory;import api.IAccountService;import sgm.manager.ui.*;import sgm.student.ui.StudentInfoDialog;import sgm.student.ui.StudentQueryScoreDialog;import sgm.teacher.ui.TeacherInfoDailog;import sgm.teacher.ui.TeacherInputScoreDialog;public class MainWindow extends

16、 javax.swing.JFrame private Account account;private Action allStudentsInfoAction;private Action allTeachersInfoAction;private Action allAccountsAction;private Action allScoreAction;private Action allCourseAction;private Action choiceCourseAction;private Action studenInfoAction;private Action student

17、QueryScoreAction;private Action teacherInfoAction;private Action teacherInputAction;private Action exitAction;public MainWindow(Account account) this.setSize(800, 600);setTitle(學(xué)生成績(jī)管理系統(tǒng)首頁(yè));setDefaultCloseOperation(EXIT_ON_CLOSE);setLocationRelativeTo(null);this.account = account;JLabel label = new J

18、Label(new ImageIcon(image/sunset.jpg);this.add(label);createActions();setPermission();private void setPermission() int permission = account.getPermission();if (permission = 1) JMenuBar bar = new JMenuBar();JMenu menu1 = new JMenu(基本信息管理);menu1.add(studentQueryScoreAction);bar.add(menu1);this.setJMen

19、uBar(bar);if (permission = 2) JMenuBar bar = new JMenuBar();JMenu menu1 = new JMenu(基本信息管理);menu1.add(teacherInfoAction);menu1.add(teacherInputAction);bar.add(menu1);this.setJMenuBar(bar);if (permission = 3) JMenuBar bar = new JMenuBar();JMenu menu1 = new JMenu(基本信息管理);menu1.add(allStudentsInfoActio

20、n);menu1.add(allTeachersInfoAction);menu1.add(allCourseAction);menu1.add(allAccountsAction);bar.add(menu1);JMenu menu2 = new JMenu(選課管理);menu2.add(choiceCourseAction);bar.add(menu2);JMenu menu3 = new JMenu(系統(tǒng)管理);menu3.add(exitAction);bar.add(menu3);this.setJMenuBar(bar); private void createActions()

21、 exitAction =new AbstractAction(安全退出) Overridepublic void actionPerformed(ActionEvent e) System.exit(0);allStudentsInfoAction = new AbstractAction(學(xué)生信息管理) Overridepublic void actionPerformed(ActionEvent e) AllStudentsInfoDialog dialog = new AllStudentsInfoDialog(MainWindow.this);dialog.setVisible(tr

22、ue);allTeachersInfoAction = new AbstractAction(教師信息管理) Overridepublic void actionPerformed(ActionEvent e) AllTeachersInfoDialog dialog = new AllTeachersInfoDialog(MainWindow.this);dialog.setVisible(true);allCourseAction = new AbstractAction(課程信息管理) Overridepublic void actionPerformed(ActionEvent e)

23、AllCoursesInfoDialog dialog = new AllCoursesInfoDialog(MainWindow.this);dialog.setVisible(true);allAccountsAction = new AbstractAction(賬戶管理) Overridepublic void actionPerformed(ActionEvent e) AccountInfoDialog dialog = new AccountInfoDialog(MainWindow.this);dialog.setVisible(true);allScoreAction = n

24、ew AbstractAction(成績(jī)管理) Overridepublic void actionPerformed(ActionEvent e) JOptionPane.showMessageDialog(MainWindow.this, 成績(jī)管理功能還沒(méi)實(shí)現(xiàn)!);choiceCourseAction = new AbstractAction(選課管理) Overridepublic void actionPerformed(ActionEvent e) ChoiceCourseDialog dialog = new ChoiceCourseDialog(MainWindow.this);

25、dialog.setVisible(true);studenInfoAction = new AbstractAction(基本信息) Overridepublic void actionPerformed(ActionEvent e) Student student = Factory.createAccountService().findStudent(account);StudentInfoDialog dialog = new StudentInfoDialog(MainWindow.this, student);dialog.setVisible(true); ;studentQue

26、ryScoreAction = new AbstractAction(查看成績(jī)) Overridepublic void actionPerformed(ActionEvent e) Student student = Factory.createAccountService().findStudent(account);StudentQueryScoreDialog dialog = new StudentQueryScoreDialog(MainWindow.this, student);dialog.setVisible(true);teacherInfoAction = new Abs

27、tractAction(基本信息) Overridepublic void actionPerformed(ActionEvent e) Teacher teacher = Factory.createAccountService().findTeacher(account);TeacherInfoDailog dialog = new TeacherInfoDailog(MainWindow.this, teacher);dialog.setVisible(true);teacherInputAction = new AbstractAction(錄入成績(jī)) Overridepublic v

28、oid actionPerformed(ActionEvent e) Teacher teacher = Factory.createAccountService().findTeacher(account);if(Factory.createChoiceCourseService().findInclass(teacher).isEmpty()JOptionPane.showMessageDialog(MainWindow.this, 錄入成績(jī)功能未開(kāi)通!);return;TeacherInputScoreDialog dialog = new TeacherInputScoreDialog

29、(MainWindow.this, teacher);dialog.setVisible(true); ;package domain;public class Account private int id; private String userName; private String password; private int permission;public Account(int id, String name, String password, int permission) this.id = id;this.userName = name;this.password = pas

30、sword;this.permission = permission;public int getId() return id;public void setId(int id) this.id = id;public String getName() return userName;public void setName(String name) this.userName = name;public String getPassword() return password;public void setPassword(String password) this.password = pa

31、ssword;public int getPermission() return permission;public void setPermission(int permission) this.permission = permission;Overridepublic int hashCode() final int prime = 31;int result = 1;result = prime * result + id;return result; Overridepublic boolean equals(Object obj) if (this = obj)return tru

32、e;if (obj = null)return false;if (getClass() != obj.getClass()return false;Account other = (Account) obj;if (id != other.id)return false;return true;package domain;public class Course private int number;private String name; public Course(int number, String name) super();this.number = number;this.nam

33、e = name; public int getNumber() return number; public void setNumber(int number) this.number = number; public String getName() return name; public void setName(String name) = name; Overridepublic int hashCode() final int prime = 31;int result = 1;result = prime * result + number;return re

34、sult; Overridepublic boolean equals(Object obj) if (this = obj)return true;if (obj = null)return false;if (getClass() != obj.getClass()return false;Course other = (Course) obj;if (number != other.number)return false;return true;Overridepublic String toString()return name;package domain;public class

35、Score private String student_number;private int course_number;private int score;private String teacher_number;private String term;public Score(String student_number, int course_number, int score,String teacher_number, String term) this.student_number = student_number;this.course_number = course_numb

36、er;this.score = score;this.teacher_number = teacher_number;this.term = term;public String getStudent_number() return student_number;public void setStudent_number(String student_number) this.student_number = student_number;public int getCourse_number() return course_number;public void setCourse_numbe

37、r(int course_number) this.course_number = course_number;public int getScore() return score;public void setScore(int score) this.score = score;public String getTeacher_number() return teacher_number;public void setTeacher_number(String teacher_number) this.teacher_number = teacher_number;public Strin

38、g getTerm() return term; public void setTerm(String term) this.term = term; Overridepublic int hashCode() final int prime = 31;int result = 1;result = prime * result + course_number;result = prime * result+ (student_number = null) ? 0 : student_number.hashCode();return result; Overridepublic boolean

39、 equals(Object obj) if (this = obj)return true;if (obj = null)return false;if (getClass() != obj.getClass()return false;Score other = (Score) obj;if (course_number != other.course_number)return false;if (student_number = null) if (other.student_number != null)return false; else if (!student_number.e

40、quals(other.student_number)return false;return true;package domain;public class Student private String number;private String name;private String sex;private int age;private Department department;private String phoneNumber;private String IdCardNo;private Inclass inclass;private String homeAddress; pu

41、blic Student(String number, String name, String sex, int age,Department department, String phoneNumber, String idCardNo,Inclass inclass, String homeAddress) this.number = number; = name;this.sex = sex;this.age = age;this.department = department;this.phoneNumber = phoneNumber;IdCardNo = idCa

42、rdNo;this.inclass = inclass;this.homeAddress = homeAddress;public String getNumber() return number; public void setNumber(String number) this.number = number; public String getName() return name; public void setName(String name) = name; public String getSex() return sex; public void setSex

43、(String sex) this.sex = sex; public int getAge() return age; public void setAge(int age) this.age = age; public Department getDepartment() return department; public void setDepartment(Department department) this.department = department; public String getPhoneNumber() return phoneNumber;public void s

44、etPhoneNumber(String phoneNumber) this.phoneNumber = phoneNumber; public String getIdCardNo() return IdCardNo; public void setIdCardNo(String idCardNo) IdCardNo = idCardNo; public Inclass getInclass() return inclass; public void setInclass(Inclass inclass) this.inclass = inclass; public String getHo

45、meAddress() return homeAddress; public void setHomeAddress(String homeAddress) this.homeAddress = homeAddress;package factory;import java.util.List;import dao.AccountDao;import dao.ChoiceCourseDao;import dao.CourseDao;import dao.DepartmentDao;import dao.InclassDao;import dao.ScoreDao;import dao.Stud

46、entDao;import dao.TeacherDao;import domain.Department;import domain.Inclass;import api.IAccountDao;import api.IAccountService;import api.IChoiceCourseDao;import api.IChoiceCourseService;import api.ICourseDao;import api.ICourseService;import api.IDeparmentDao;import api.IDepartmentService;import api.

47、IInclassDao;import api.IInclassService;import api.IScoreDao;import api.IScoreService;import api.IStudentDao;import api.IStudentService;import api.ITeacherDao;import api.ITeacherService;import service.AccountService;import service.ChoiceCourseService;import service.CourseService;import service.Depart

48、mentService;import service.InclassService;import service.ScoreService;import service.StudentService;import service.TeacherService;public class Factory private static IAccountDao accountDao = new AccountDao();private static IStudentDao studentDao = new StudentDao();private static IStudentService stud

49、entService = new StudentService(studentDao);private static IDeparmentDao deparmentDao = new DepartmentDao();private static IAccountService accountService = new AccountService(accountDao);private static IDepartmentService departmentService = new DepartmentService(deparmentDao);private static IInclassDao inclassDao = new InclassDao();private static IInclassService inclassService = new InclassService(inclassDao);private static ITeacherDao teacherDao = new TeacherDao();private static ITeacherServic

溫馨提示

  • 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)論