1、ONLINE-TESTSYSTEM李 阳 java46151项目项目概述概述与工作进展与工作进展项目概述 在线考试系统是一个服务于老师和学生的学习系统。在系统中注册后,老师可以创建班级,并且在班级中出卷,学生申请加入班级,得到老师的同意后,可以对该班级中的试卷进行检测,检测完毕后,学生和老师都可以看到该次考试的成绩。老师可以对自己所创建的班级、班级中的学生、班级中的试卷以及个人信息进行管理,学生可以参加考试、管理自己的个人信息。相关工作进展说明 已经实现了在线考试、电子作业、模拟考试、班级统一考试、录入试卷、考卷评阅与成绩管理等功能。2项目的模块划分项目的模块划分项目的基本模块 1.班级管理模
2、块 2.试题管理模块 3.学生管理模块 4.个人信息管理模块3用例图用例图图1-1 用例图14图1-2 用例图25项目的领域模型项目的领域模型实体关系图图1-3 实体关系图6项目的物理模型项目的物理模型图1-4 list of references7项目的包介绍项目的包介绍src中10个包 part1po 对象 ClassInfo PaperInfo ScoreInfo SelectionInfo StuansInfo StuInClassInfo StuInfo TeaInfo UserLogindao 接口dao.impl 接口实现类service 业务层service.impl 业务层接
3、口实现类图1-5 包8项目的包介绍项目的包介绍src中10个包 part2res.images 系统图片res.dbconf JDBC文件testsystem.enumpck 枚举testsystem.util 工具类testsystem.view 视图层9项目截图项目截图登录页面图1-6 MainJFrame10主界面图1-7 MainJFrame11教师出试卷界面图1-8 CreatePaperJFrame12教师查看/修改试卷信息界面图1-9 PaperDetailJFrame13学生查看考试成绩图1-10 ScoreJFrame14个人信息界面图1-11 UserInfoJFrame1
4、5部分代码部分代码显示试卷内容private void ShowSel(int no)SelectionInfo si=new SelectionInfo();/System.out.println(CreatePaperJFrame:313+list_sel.size()+no);if(list_sel.size()no-1)si=list_sel.get(no-1);this.textArea.setText(si.getSequest();this.textArea_1.setText(si.getSeA1();this.textArea_2.setText(si.getSeA2();t
5、his.textArea_3.setText(si.getSeA3();this.textArea_4.setText(si.getSeA4();boBox_1.setSelectedIndex(si.getSeans()-1);this.textField_1.setText(+si.getSeScore();elsethis.textArea.setText();this.textArea_1.setText();this.textArea_2.setText();16this.textArea_3.setText();this.textArea_4.setText();boBox_1.s
6、etSelectedIndex(0);this.textField_1.setText();if(no=1)this.btnNewButton.setEnabled(false);elsethis.btnNewButton.setEnabled(true);if(list_sel.size()=no)this.btnNewButton_1.setEnabled(false);elsethis.btnNewButton_1.setEnabled(true);this.textField_2.setText(+no);sumscore=0;for(int i=0;ilist_sel.size();
7、i+)sumscore+=list_sel.get(i).getSeScore();this.textField_3.setText(+sumscore);17保存试卷if(checkform()=true)if(list_sel.size()currentNO)list_sel.add(currentNO-1,GenSel();elselist_sel.set(currentNO-1,GenSel();ShowSel(currentNO);/添加试卷SimpleDateFormat sdf=new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);PaperInfo
8、 p=new PaperInfo();p.setCid(list.get(comboBox.getSelectedIndex()-1).getCid();p.setPname(textField.getText().trim();p.setPtime(sdf.format(new Date();sumscore=Float.parseFloat(textField_3.getText().trim();p.setPscore(sumscore);p.setPvisible(VisibleType.VISIBLE);p.setPqcount(list_sel.size();18final Pap
9、erInfoService pservice=new PaperInfoServiceImpl();final SelectionInfoService selservice=new SelectionInfoServiceImpl();/temppid临时存放试卷的id int temppid=pservice.insert(p);if(temppid!=0)if(selservice.insert_sel(list_sel,temppid)JOptionPane.showMessageDialog(null,录入新试卷成功了!);CreatePaperJFrame.this.dispose();19项目总结项目总结本系统从确立需求到基本功能得以实现,总共花费时间二十余天,期间因为基本功不够扎实,进度非常缓慢,遇到了许多困难,比如如何实现出试卷的功能,通过与别人的交流,上网搜寻资料,逐步解决。通过自己实际动手操作,将二阶段学习的知识点应用到实践项目中,既夯实了我们的基础,又提高了我们的动手能力。20Q&A21