搜档网
当前位置:搜档网 › 在线考试系统JAVA

在线考试系统JAVA

在线考试系统JAVA
在线考试系统JAVA

题目 在线考试系统

1、 实验目的

①熟练运用JAVA 开发环境及工具、并用JAVA 语言编写程序; ②掌握面向对象的概念;

③掌握系统功能模块的合理划分,并实现各模块接口的连接; ④掌握C/S 结构的编程方法; ⑤设计数据库模型。

2、 实验内容

①编辑生成试题库,随机生成本次考试试题,同时提供在线评分并保存结果。 ②选择ACCESS 作为后台的数据库。

3、 实验过程

3.1 系统模块部分设计

题库管理:用于对单个试题的增、删、改、查等基本维护,还可对题库进行数据备份和数据还原。我们针对不同题型、不同应用范围及不同科目对试题进行维护。 试卷管理:可进行三种组卷方式的维护:随机组卷、人工组卷、综合组卷。还可对考生的基本信息进行维护。

考试管理:对考试分配试卷,并对考试的基本信息进行维护。相当于人工安排考试的过程

评卷管理:对试卷的客观题分配评卷人,并对评卷人基本信息进行管理。 成绩管理:对每次考试的学生成绩的基本信息进行维护,并提供学生成绩的统计管理。

用户管理:对使用本系统的用户基本信息进行维护,用户多数为:系统管理员、老师、教务处人员、其他

权限管理:对系统的访问权限进行管理,并对用户可进行权限的分配。

系统应该具备的基本功能 各模块需完成以下功能:

在线考试系统

信息管理

评卷管理

试卷管理

库管理

成绩管理

考试管理

用户管理

权限管理

题型维护:对试题的题型进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。

范围维护:对试题的应用范围进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。

科目维护:对试题的科目进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。

试题维护:对试题的基本信息进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。

其他维护:对试题信息的批量查询,并可进行数据导出、数据备份、数据恢复。 随机组卷:用户只需对试卷题型进行设置就可组卷的方式。 人工组卷:可使用户选择试卷的题型中的试题的组卷方式。 综合组卷:是随机组卷与人工组卷的混合组卷方式,即用户对某一类型的试题可进行选择,也可对试题不进行选择。

试卷其他维护:对试卷信息的批量查询,对试题的数据备份与还原。

考试信息维护:对考试的时间、地点、监考人、考试用的试卷、试卷总分数及答卷总时间等考试的基本要素进行设置。

考生信息维护:对考试的学生的基本信息进行增、删、改、查操作,在操作之后会自动刷新主页,以使信息更新。 分配评卷人:对考试所用试卷的客观题分配评卷人,并对评卷的基本信息进行维护。

评卷人评卷:对分配试卷的评卷人可以在此进行评卷。 考生成绩维护:对考试的考生成绩信息进行统计与汇总,对有权限的人可进行成

考试管理 考试信息维护 分配评卷人 评卷管理 成绩管理 评卷人评卷 考生信息维护 考生成绩维护 成绩其他维护 题库管理 试卷管理 试卷其他维护 试卷信息维护 其它 维护 试题 维护 基本 维护 综

合组卷 人工组卷 随机组卷 题型维护 科目维护 范围维护

绩的增、删、改、查操作。

成绩其他维护:对考生成绩信息的批量查询,并可进行数据导出、数据备份、数据恢复。

用户基本信息维护:对使用本系统的用户进行维护,而用户的权限由权限管理进

行维护,并分配给用户,使用户只能访问自己拥有的权限内。 权限信息维护:对基本的权限进行维护,用户可自定义维护权限。

用户分配权限:对未分配权限的用户进行权限的分配,即对 分配权限的增、删、改、查操作。

信息基本维护:我们的信息除了有关考试的信息外,还有公告、新闻、留言信息需要我们维护,其中公告、新闻由后台有权限的人进行增、删、改、查操作,而留言是由前台的用户(学生)或游客录入的,我们要防止垃圾数据显示,即对留言有权更改等操作。 3.2系统结构图

1、本系统分为学生前台子系统和考试管理子系统,整个系统的结构图如下:

3.3 数据库设计

在线考试系统

考生

前 台

后台管 理

题库管理

评卷管理 考试管理

试卷管理

成绩管理

用户管理

权限管理 学生登陆

用户管理 权限管理 信息管理

权限信息维护 用户基本信息 信息基

本维护 用户分配权限

试题类型表(questionType_table):其中包括了试题的类型的基本信息,如类型名称、答题方式、说明信息等字段;录入时,我们将答题方式确定为大概几种类型:填空方式,选择方式,问答方式,判断方式,综合方式。

试题范围表(questionBound_table):用于控制试题应用的范围,如同样的科目语文,在小学、初中、高中、大学都有,由此我们设定了此表,此表中有范围名称、范围说明等基本信息;

所属科目表(questionSubject_table):用于录入试题相关的科目应用,它可以有不同的应用范围。如上所述,我们只需录入一次的科目,就可方便我们在录入试题时每次都录。各种题库表:我们采用一种类型的题存储在一个表中,由此我们会有填空题表(question_blanc_table)、单选题表

(question_selectone_table)、多选题表(question_selectMany_tabel)一题多问表(question_askone_table)、一题多问表(question_askMany_table)、判断题表(question_judge_table)等试题表

试卷表(exam_table):用于报存考试中试卷的基本信息,如出卷方式(有随机出卷、人工出卷、综合出卷)、试卷名称、试卷应用范围(与试题范围相对应)、试卷所属科目(与试题科目相对应)、试题标题级别、试题标题内容、试题总类型、试题个数、试题总ID等基本信息。

学生表(student_table):用于保存学生的考试的用户名及登陆密码。

成绩表(grade_table):用于存储学生的考试成绩。

评题表(appraiser_question_table):对于主观题的答案我们须要评卷人(有权限的用户)进行手工评卷,本表用来存储评卷人评卷的一些信息。

答案表(student_answer_table):用于存储学生问答题的答案,如试卷ID,学生ID及各种试题类型的答案字段。

用户表(user_table):用于保存用户的登陆的基本信息及分配的权限。

权限表(purview_table):用于存储用户组织的的权限,通过分配操作模块的权限组织权限。

4、关键代码及其分析

4.1----------------ServerGui.java------------------

public void actionPerformed(ActionEvent e) {

if (e.getSource() == log) {

// boolean b=login();

String username = JOptionPane.showInputDialog(this, "请输入用户名",

"输入用户名", JOptionPane.QUESTION_MESSAGE).trim();

String password = JOptionPane.showInputDialog(this, "请输入密码",

"输入密码", JOptionPane.QUESTION_MESSAGE).trim();

if (username == null || password == null) {

username = "temp";

password = "temp";

return;

}

adminCheck(username, password);// 验证管理员

if (tf == true) {

JOptionPane.showMessageDialog(thi s, "登陆成功!", "成功",

https://www.sodocs.net/doc/1c17537894.html,RMATION_MESSAGE);

toolBar1.setVisible(true);

split_one.setVisible(true);

} else {

JOptionPane.showMessageDialog(thi s, "登陆失败!", "失败",

JOptionPane.ERROR_MESSAGE);

return;

}

} else if (e.getSource() == setCount) {

userCount = JOptionPane.showInputDialog(this, "请输入本次考试的人数");

inittest(); // 数据库信息初始化

} else if (e.getSource() == startSer) {

if (settime == true && setcount == true) {

new ServerManager();

serArea.append("服务器已启动\n预设考试人数为:" + userCount + "\n考试时间为:"

+ timeCount + "\n");

start = true;

} else {

JOptionPane.showMessageDialog(thi s, "你还没有设置考试信息", "警告信息",

https://www.sodocs.net/doc/1c17537894.html,RMATION_MESSAGE);

}

} if (start == true)

{

linkArea.append(ServerManager

.linkShow(ServerManager.linkstatu s)

+ "\n");

} else {

JOptionPane.showMessageDialog(thi s, "服务器还没有启动不能进行操作", "警告信息",

https://www.sodocs.net/doc/1c17537894.html,RMATION_MESSAGE);

}

} else if (e.getSource() == userButton) {

if (start == true)

{

userArea.append(ServerManager

.userShow(https://www.sodocs.net/doc/1c17537894.html,erstatu s)

+ "\n");

userArea.append(ServerManager.cou ntShow(ServerManager.ucount));

} else {

public void adminCheck(String s1, String s2)

ConnectBean cb=new ConnectBean();

if (!cb.openConnection()) {

System.out.println("连接数据失败");

System.exit(1);

return;

}

4.2-----------------Server_login.java----------------- // 定义一个接收用户登陆的类

public void run() {

String s = null;

try {

s = in.readUTF(); // 接收考试号和密码,然后分别取出

StringTokenizer st = new StringTokenizer(s, ",");

if (st.hasMoreTokens()) {

str1 = st.nextToken();

str2 = st.nextToken();

System.out.println("username :" + str1);

System.out.println("password :" + str2);

}

} catch (IOException e) {

e.printStackTrace();

}

// 读取数据库里的用户信息并进行验证

try {

ConnectBean cb = new ConnectBean();

if (!cb.openConnection()) {

System.out.println("

连接数据失败");

System.exit(1);

return;

}

cb.createPreparedStatement("selec t flag from stuinfo where sno='"

+ str1 + "'

ResultSet r = cb.executeQuery();

String m ="";

while (r.next()) {

m=r.getString("flag");

}

System.out.println("标识:"+m);

if ( !m.equals("0") ) {

out.writeUTF("用户已经完成考试,不能再考试");

} else {

cb.createPreparedStatement(

"select sname,spass from stuinfo where sno='" + str1

+ "'", false);

ResultSet rs = cb.executeQuery();

while (rs.next()) {

dbn = rs.getString("sname");

dbp =

rs.getString("spass");

System.out.println("用户: " + str1 + " 你的用户名为:" + dbn

+ ", 你的密码为:" + dbp);

}

// 验证用户密码,如果登录成功将登录标志设为1

if

(str2.equals(dbp.trim())) {

out.writeUTF("用户 " + dbn + " 登陆成功");

System.out.println("用户 " + dbn + " 登陆成功");

out.close();

String sql1 = "update stuinfo set flag = '1' where sno= '"+str1+"'";

PreparedStatement ps = cb.createPreparedStatement(sql1);

ps.executeUpdate();

System.out.println("用户成功登录");

}

else {

out.writeUTF("密码错误");

System.out.println("登陆密码错误");

out.close();

}

cb.close();

4.3-----------------ServerManager.java----------------

public ServerManager() {

Thread td1 = new Thread() {

public void run() {

serstatus= "login thread start!\n";

serShow(serstatus);

ServerSocket ss1 = null;

Socket you = null;

int port1 = 8001;

try {

ss1 = new ServerSocket(port1);

serstatus = "listener the port:" + port1;

serShow(serstatus);

} catch (IOException e) {

e.printStackTrace();

}

while (true) {

try {

you = ss1.accept();

} catch

(IOException e) {

e.printStackTrace();

}

if (you != null) {

counter++;

ucount = "现在参加考试的人数为:" + counter;

countShow(ucount);

if (counter < Maxcount) {

userstatus= "user's IP" + you.getInetAddress()

+ " connected " + port1 + "进行登陆";

userShow(userstatus);

// 第一个线程启动

new Server_login(you).start();

} else {

userstatus = "user's IP" + you.getInetAddress()

+ " connected " + port1 + "中断线程启动";

userShow(userstatus);

// 中断线程启动

new Maxcounter(you);

};

td1.start();

// 启动一个响应客户端读取试题的线程

Thread td2 = new Thread("two") {

public void run() {

serstatus= "thread 2 start!";

serShow(linkstatus);

ServerSocket ss2 = null;

int port2 = 8002;

try {

ss2 = new ServerSocket(port2);

linkstatus = "listener the port:" + port2;

linkShow(serstatus);

} catch (IOException e) {

e.printStackTrace();

}

while (true) {

Socket you2 = null;

try {

you2 = ss2.accept();

} catch (IOException e) {

e.printStackTrace();

}

if (you2 != null) {

userstatus =

"user's IP" + you2.getInetAddress()

+ " connected " + port2 + "进行读题";

userShow(userstatus);

new

Server_readTest(you2).start();

}}}

};

td2.start()

// 启动一个接收用户答应并存储的线程

Thread td3 = new Thread("three") {

ServerSocket ss3 = null;

int port3 = 8003;

public void run() {

serstatus="thread 3 start!";

serShow(serstatus);

try {

ss3 = new ServerSocket(port3);

linkstatus="listener the port:" + port3;

linkShow(linkstatus);

} catch (IOException e) {

e.printStackTrace();

}

while (true) {

Socket you3 = null;

try {

you3 = ss3.accept();

} catch (IOException e) {

e.printStackTrace();

}

if (you3 != null) {

userstatus="user's IP" + you3.getInetAddress()

+ " connected " + port3 + "提交答案";

userShow(userstatus);

// 第3个线程启动

new

Server_readScore(you3).start();

}

}

}

};

td3.start();

// 启动一个用户查询的线程

Thread td4 = new Thread("four") {

ServerSocket ss4 = null;

int port4 = 8004;

public void run() {

serstatus="thread 4 start!";

serShow(serstatus);

try {

ss4 = new ServerSocket(port4);

linkstatus="listener the port:" + port4;

linkShow(linkstatus);

} catch (IOException e) {

e.printStackTrace();

}

while (true) {

Socket you4 = null;

try {

you4 = ss4.accept();

} catch (IOException e) {

e.printStackTrace();

}

if (you4 != null) {

userstatus="user's IP" + you4.getInetAddress()

+ " connected " + port4 + "进行查询";

userShow(userstatus);

4.4-------------Server_readTest.java----------------

public void run() {

String sql2; // 定义查询语句

String dbt = "以下为试题"; // 试题

String ts = null; // 接收用户发送的考试科目

int tcount = 0; // 试题的数目

try {

// 网络连接部分

out.writeUTF("你连接成功");

ts = in.readUTF();

System.out.println(ts);

// 数据库连接部分

// 查询客户端所选试题

ConnectBean cb = new ConnectBean();

if (!cb.openConnection()) {

System.out.println("

连接数据失败");

System.exit(1);

return;

}

//在数据库选题

sql2 = "select * from exam where eid='" + ts + "'";

cb.createPreparedStatement(sql2, false);

ResultSet rs = cb.executeQuery();

while (rs.next()) {

dbt += "^"+"\n"+rs.getString(2) +

"\t" + "\n" + rs.getString(3) +" ^";

tcount++;

}

cb.close();

System.out.println(dbt);

System.out.println(tcount);

out.writeUTF(Integer.toString(tco unt));

out.writeUTF(dbt); // 将读到的试题返回到客户端

//传送考试时间

out.writeUTF(""+Timecount);

out.flush();

out.close();

System.out.println("读取试题成功!!");

} catch (SQLException e) {

e.printStackTrace();

System.out.println("not connect db");

} catch (IOException e1) {

System.out.println("not read client select!");

}

}

4.5--------------/Server_readScore.java------------------

// 定义一个接收用户答案的类,判断对错,将分数返回到用户端,并将成绩存入数据库public Server_readScore(Socket socket)

{

// ----------------------创建网络连接----------------------------------// this.socket = socket; .........

public void run() {

// ------------------------- 接收用户提交的答案---------------------------//

try {

readkey = in.readUTF();

System.out.println(readkey);

} catch (IOException e1) {

e1.printStackTrace();

}

StringTokenizer stc = new StringTokenizer(readkey, ",");

if (stc.hasMoreTokens()) {

// 客户传来答案的第一个字符为用户名,第二个字符为考试科目

str1 = stc.nextToken().trim();

System.out.println("用户为:" + str1);

uno = Integer.parseInt(str1);

}

if (stc.hasMoreTokens()) {

//第二个字符为考试科目

str2 = stc.nextToken().trim();

System.out.println("试题类型为:" + str2);

}

................

//

------------------------------在数据库获取正确答案-------------------------//

try {

ConnectBean cb = new ConnectBean();

if (!cb.openConnection()) {

System.out.println("

连接数据失败");

System.exit(1);

return;

}

..............

}

// ------------------------判断分数---------------------------------//

for (int i = 0; i

if

(userAnswer[i].equals(crreAnswer[i])) {

count += 10;

}

}

System.out.println("用户:" + str1 + ",你的得分为:" + count);

// 将分数返回到客户端

try {

out.writeUTF(Integer.toString(cou nt));

System.out.println("将分数返回到客户端");

out.flush();

out.close();

} catch (IOException e) {

e.printStackTrace();

}

// ------------------------将分数存到数据库------------------------------//

try {

ConnectBean cb = new ConnectBean();

if (!cb.openConnection()) {

System.out.println("

连接数据失败");

System.exit(1);

return;

}

PreparedStatement ps = cb.createPreparedStatement(subject);

ps.setInt(1, count);

ps.setInt(2, uno);

ps.executeUpdate();

System.out.println("更新成功");

https://www.sodocs.net/doc/1c17537894.html,mit();

cb.close();

} catch (SQLException e) {

// TODO 自动生成 catch 块

System.out.println("写入数据发生错误!!!/n" + e);

}

}

4.6-------------------------Server.java----------------------

............

public static void main(String args[])

{

new Server();

.........

}

}

4.7--------------------TestGui.java-------------------

public void actionPerformed(ActionEvent e) {

if (e.getSource() == callIP) { // 呼叫服务器 if (socket != null && in != null && out != null) // 消除以往的连接信息 { try { socket.close(); in.close(); out.close(); } catch (Exception ee) { } } String login = user + "," + pass; int port1 = 8001; try { // 建立网络连接 socket = new Socket(ip, port1); in = new DataInputStream(socket.getInputStream ()); out = new DataOutputStream(socket.getOutputStre am()); out.writeUTF(login); } catch (IOException ee) // 如果连接失败 { ipField.setText("呼叫失败"); stateField.setText("你呼叫没有成功"); } int port4 = 8004; try { socket = new Socket(ip, port4); in = new DataInputStream(socket.getInputStream ()); out = new DataOutputStream(socket.getOutputStre am()); out.writeUTF(user); stuinfo.setText("请求信息已发送"); } catch (IOException ee) // 如果连接失败 { ipField.setText("呼叫失败"); stateField.setText("你呼叫没有成功"); stuinfo.setText("你呼叫没有成功"); } if (socket != null) // 如果连接成功 { try { String queryInfo = in.readUTF(); // 得到查询结果 stuinfo.setText(queryInfo); out.flush(); out.close(); } catch (IOException e1) { // 出现异常 otherinfo.setText("数据传输错误");

}

}

} else if (e.getSource() == beginExe) { // 生成试题

String mgr = (String) subject.getSelectedItem();

if (mgr.equals("英语")) { // 选择英语

selectT("e");

} else if (mgr.equals("数学")) { // 选择数学

selectT("m");

}

stateField.setText("你已经选择了" + mgr + "试题");

testinfo.setText("你已经选择了" + mgr + "试题");

startTest.setEnabled(true);

} else if (e.getSource() == startTest) { // 开始考试

stateField.setText("考试开始,时钟计时");

timeFlag = true;

start();

............

} else if (e.getSource() == readNext) { // 读下一题目

tempStr1 = keyField.getText().trim();

uanswer += tempStr1 + "@";

if (n <= enu-1) {

System.out.println(tempStr1);

stateField.setText("第" + n + "题,你选择的答案是:" + tempStr1);

++n;

// 显示下一题

testArea.setText(tempTest[num]);

++num;

} ...............

try {

socket.close();

in.close();

out.close();

} catch (Exception ee) {

System.out.print("消除以往的连接");

}

try {

socket = new Socket(ip, port3);

in = new DataInputStream(socket.getInputStream ());

out = new DataOutputStream(socket.getOutputStre am());

out.writeUTF(user + "," + sub + "," + uanswer + "," + enu);

stateField.setText("

你已经提交完毕,请点击查看分数");

testinfo.setText("你已经提交完毕,请点击查看分数");

} catch (UnknownHostException e1) {

stateField.setText("

未找到服务器");

} catch (IOException e1) {

stateField.setText("

数据传输出错");

}

timeFlag = false;

lookScore.setEnabled(true);

} else if (e.getSource() == lookScore) { // 查看分数

public void run() {

--minute;

while (minute >= 0 && timeFlag) {

try {

sleep(1000);

} catch (InterruptedException e) {

System.out.println(e.getMessage() );

e.printStackTrace();

}

second--;

if (second == 0) {

minute--;

second = 59;

}

lastTimeF.setText(Integer.toStrin g(minute) + " : "

+

Integer.toString(second));

if (minute == 0 && second == 59) {

JOptionPane.showMessageDialog(nul l, "离考试结束还有1分钟,请抓紧答题!",

"时间提示对话框", https://www.sodocs.net/doc/1c17537894.html,RMATION_MESSAGE);

}

if (minute == 0 && second == 0) {

System.exit(0);

}

}

}

public void selectT(String mgr) { tempTest = new String[100];

String str1 = null, str2 = null;

if (socket != null && in != null && out != null) // 消除以往的连接信息

try {

socket.close();

in.close();

out.close();

} catch (Exception ee) {

otherinfo.setText("消除以往的连接");

}

............

4.8-----------------------Client.java--------------------------

public void actionPerformed(ActionEvent e)

{

if(e.getSource()==timer1)

{

i=i+1;

j=(j+2)%360;

Color color=new Color((3*i)%255,(7*i)%255,(11*i)%255) ;

label.setForeground(color);

progress.setValue(progress.getValue() + 1);

if(i>=150) {

JFrame.setDefaultLookAndFeelDecor ated(true);

new TestGui(); this.dispose(); timer1.stop(); timer2.stop(); } }

if(e.getSource()==timer2) {

if(n<12)

{

label.setText(s.substring(0,n)); if(n==10) n=0; } n++; } }//

public static void main(String args[]) {

new Client();

} }

在线考试系统JAVA

题目 在线考试系统 1、 实验目的 ①熟练运用JAVA 开发环境及工具、并用JAVA 语言编写程序; ②掌握面向对象的概念; ③掌握系统功能模块的合理划分,并实现各模块接口的连接; ④掌握C/S 结构的编程方法; ⑤设计数据库模型。 2、 实验内容 ①编辑生成试题库,随机生成本次考试试题,同时提供在线评分并保存结果。 ②选择ACCESS 作为后台的数据库。 3、 实验过程 3.1 系统模块部分设计 题库管理:用于对单个试题的增、删、改、查等基本维护,还可对题库进行数据备份和数据还原。我们针对不同题型、不同应用范围及不同科目对试题进行维护。 试卷管理:可进行三种组卷方式的维护:随机组卷、人工组卷、综合组卷。还可对考生的基本信息进行维护。 考试管理:对考试分配试卷,并对考试的基本信息进行维护。相当于人工安排考试的过程 评卷管理:对试卷的客观题分配评卷人,并对评卷人基本信息进行管理。 成绩管理:对每次考试的学生成绩的基本信息进行维护,并提供学生成绩的统计管理。 用户管理:对使用本系统的用户基本信息进行维护,用户多数为:系统管理员、老师、教务处人员、其他 权限管理:对系统的访问权限进行管理,并对用户可进行权限的分配。 系统应该具备的基本功能 各模块需完成以下功能: 在线考试系统 信息管理 评卷管理 试卷管理 题 库管理 成绩管理 考试管理 用户管理 权限管理

题型维护:对试题的题型进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 范围维护:对试题的应用范围进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 科目维护:对试题的科目进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 试题维护:对试题的基本信息进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 其他维护:对试题信息的批量查询,并可进行数据导出、数据备份、数据恢复。 随机组卷:用户只需对试卷题型进行设置就可组卷的方式。 人工组卷:可使用户选择试卷的题型中的试题的组卷方式。 综合组卷:是随机组卷与人工组卷的混合组卷方式,即用户对某一类型的试题可进行选择,也可对试题不进行选择。 试卷其他维护:对试卷信息的批量查询,对试题的数据备份与还原。 考试信息维护:对考试的时间、地点、监考人、考试用的试卷、试卷总分数及答卷总时间等考试的基本要素进行设置。 考生信息维护:对考试的学生的基本信息进行增、删、改、查操作,在操作之后会自动刷新主页,以使信息更新。 分配评卷人:对考试所用试卷的客观题分配评卷人,并对评卷的基本信息进行维护。 评卷人评卷:对分配试卷的评卷人可以在此进行评卷。 考生成绩维护:对考试的考生成绩信息进行统计与汇总,对有权限的人可进行成 考试管理 考试信息维护 分配评卷人 评卷管理 成绩管理 评卷人评卷 考生信息维护 考生成绩维护 成绩其他维护 题库管理 试卷管理 试卷其他维护 试卷信息维护 其它 维护 试题 维护 基本 维护 综 合组卷 人工组卷 随机组卷 题型维护 科目维护 范围维护

基于JAVAEE的在线考试系统毕业设计论文

基于JAVAEE的在线考试系统 【内容提要】在线考试系统旨在实现考试的无纸化管理,对一些科目的考试可以通过互联网络或局域网进行,方便校方考务的管理,也方便了考生,尤其适合考生分布广,不易集中的远程教育。我主要开发系统的后台管理系统—JAVA 在线考试管理子系统,它包括试题管理、考生管理、试卷管理、试卷自动审批等功能。本论文主要介绍了对JAVAEE在线考试系统的分析、设计和开发的全部过程。运用ER图,程序流程图等对在线系统的设计过程进行详细的说明。全文共分为开发方案、需求分析、系统设计、关键技术解决,结论五部分。开发方案中主要介绍开发在线考试系统得目的、开发方案的选择及开发框架的技术的确定;需求分析介绍了在线考试系统的总体需求及系统各模块的功能需求;系统设计介绍了系统设计的指导思想、数据库的设计、系统模块的设计;关键技术介绍了在具体实现时需解决的一些技术,如开发框架的整合技术、开发 框架与数据库的连接及数据的备份与还原。 【关键词】:JSP, Servlet, Struts, JAVA,MySQL数据库,B/S模式 On-line examination system base on JAVA

Student : CHAO SUN supervisor: WEI MING XIAO 【ABSTRACT】On-line examination system the aim is carry out examination of have no the paper turn a management, can carry on through Internet net or bureau area net to some examinations of categories, convenient school square test the management of duty, also convenient the examinee is particularly suitable for examinee to distribute widely and not easily concentrated of long range education.I mainly develop the system-JAVAEE of the backstage management's on-line examination management sub- system of system and it includes to try the management, on-line creation of a management, examinee to try book, control the constitution that the student examine and try an examination and approval etc. function.This thesis mainly introduced to manage the analysis, design of the sub- system and all processes of the development to JAVAEE's on-line examination.Make use of ER diagram, procedure flow chart etc. to on-line manage the design process of sub- system to carry on expatiation.The full text is totally divided into the design, key technique of the analysis, system of the development project, need to solve, conclusion five part.Develop the main introduction in the project develops on-line examination system purpose, development project of choice and development frame of the assurance of technique;The need analysis introduced the total need of the on-line examination system and the function request of each mold of system piece;The system design introduced the design, system mold of the instruction thought, database of system design the design of the piece;The key technique introduced at concrete carry out need some techniques for solve, such as development frame of integration technique, development frame with The database link and the backup and revivification of data. Keyword: Servlet ,JSP, JAVA,MySql, Model of B/ S

基于Java的在线考试系统

基于J a v a的在线考 试系统 Revised on November 25, 2020

存档日期:存档编号: 本科生毕业设计(论文)论文题目:基于Java的在线考试系统 Java-Based Online Examination System 姓名: 系别: 专业: 年级、学号: 指导教师: ××大学印制

基于Java的在线考试系统 摘要:为了帮助学生更好地掌握所学的知识。本人设计了一套在线考试系统。本系统所设计的用户有管理员教师,参加练习或考试的学生和对考试进行打分的评分老师这三种身份。本系统可以根据管理员教师的意愿进行科目,试题以及试卷的管理。本系统的开发模式为B/S模式。开发平台为,所用的数据库是MySQL数据库,服务器是。所用到的主要开发语言是Java,HTMl,与JavaScript。本系统的主要特点是:操作容易,结构简单。学生利用本系统,能够更加及时的进行练习和考试。教师利用本系统可免去统计成绩,录入考试分数等繁琐的工作提高了工作效率。 关键词:在线考试B/S MySQL Java Java-Based Online Examination System Abstract:In order to help students to better understand what they have learned. I designed a set of online examination system.. This system is designed for users with three roles include administrators; students who want to participate in exercises or join in examinations and the rating teachers. The system can edit the curriculums,tests and papers according to the administrators wishes. This system uses the B / S development the development platform is , the database is MySQL and the server uses . The main development language used by the Java, HTMl, and JavaScript.Easy to operate and simple structure are the main feature of this system Students can do exercises and exam more timely with this system.This system can improve the efficiency of teachers and they do not have to worry about statistical results, entry test scores anymore. Keywords: Online exam B/S MyEclipse MySQL Java

基于java的在线考试系统_毕业设计论文

本科生毕业设计报告课题:基于java的在线考试系统

在线考试系统与传统考试相比,可以实现考务工作的全自动化管理,并有效地利用校园网的软硬件资源,实现考试的客观性和公证性;自动化组卷、阅卷、判分的流程更是大大的减轻教师的工作强度。在线考试系统旨在实现考试的无纸化管理,基于计算机和网络技术进行在线考试系统的使用,方便校方对考试的管理。 本程序是基于eclipse的在线考试系统,利用MVC架构编写,将功能分为3个模块,分别是视图,模型和控制器。将数据分为3个层次,分别为UI层,业务层,实体数据层,各层之间模块独立化,便于数据管理,易于系统维护 关键词: Eclipse,MVC架构,Java语言,三层结构。 Abstract Compared with the traditional test, online examination can realize the automation management work of the thesis, and effective use of the software and hardware of the campus network resources, realizing the objectivity of the exam and real; Automation group rolls, scoring, the process is the scores were greatly reduce teachers working strength. On-line examination system designed to achieve examination of the paperless management, based on the computer and network technology online examination system use, convenient to school examination management. The program is based on the eclipse of the online examination system, with the MVC framework to write, will function is divided into three modules, respectively is the view, model and the controller. Data is divided into three levels, respectively UI layer, business layer, the entity data layer, between each layer DuLiHua module, facilitate data management, and is easy to maintain the system. Keywords: Eclipse, MVC framework, Java language,the Three-tier Structure

基于Java的在线考试系统的设计与实现

山西大学论文编号:2008241063 论文题目基于Java的在线考试系统的 设计与实现 姓名 院系、专业计算机科学与技术、计算机科学与技术 学习年限年月至年月 指导教师 学位级别 2013年4月4日

基于Java的在线考试系统的设计与实现 学生姓名:指导老师: 内容提要当今世界网络信息技术迅速发展,网络在人们生活中的应用越来越广泛,在线考试已经成为人才选拔的重要途径。本系统基于B/S模式,使用Java语言及JSP/servlet技术,采用DIV+CSS 布局方法,使用SQLServer2005数据库技术和TomCat服务器实现了B/S模式下的在线考试系统。本系统由学生、教师和系统管理员三种用户组成。学生登陆系统可以进行在线考试、成绩查询和修改部分个人信息;教师登陆后可以进行判卷和修改部分个人信息;管理员登陆后可以对用户和试题进行维护并且实现了用户信息和试题的批量导入。本系统可用性很强,能用来进行多种计算机语言课程的考试。 关键词在线考试;java;SQLServer;JSP/servlet 1 引言 1.1问题的提出 目前,各行各业都需要大量的人才,而人才选拔的最重要的途径则是考试。现阶段,学校的考试模式大都是传统的考试模式:由老师出纸面上的卷子,学生在在卷子上答题,交卷后有老师人工判卷。这样的考试模式一是不利于老师提高工作效率;二是传统的考试模式工作量大容易出错。随着考试类型的不断增加和考试要求的不断提高,传统的考试模式已经不能满足现在选拔人才的要求。随着计算机各方面技术的迅猛发展和应用在各行各业的不断深入,人们迫切要求利用这些先进的科学技术来实现在线考试,不仅可以减轻教师的工作负担而且还能提高老师的工作效率和考试的质量。从而使考试变得更加客观、公正,也可以在一定程度上提高学生的学习兴趣。在线考试系统可以实现对学生考试和老师判卷的合理化管理,不仅能节省人工大量的时间,而且在一定程度上可以消除人的主观因素造成的影响,使考试变得更规范,更加客观、真实、全面的反应考生的水平和教学的实际效果,有助于促进教学质量的提高,有助于真正实现考、教的分离。 1.2系统开发目标 本系统计划实现一个基于Java的在线考试系统。系统主要分为三大模块,学生、老师和管理员。学生登陆进行考试,考试完成后系统自动为客观题评分。教师登陆系统,系统还原学生考试试卷,教师对主观题评完分后系统可以计算出学生总分,并生成各分数段分布信息,供给老师参考,以便能够了解学生的学习情况。管理员可以实现对用户信息的增、删、改、查,也可以实现对考题的增、删、改、查。 1.3开发工具的选择 本系统开发语言为JAVA,开发环境是MyEclipse,前台页面主要用DreamWeaver来设计。由于本系统数据量和负载量都比较大,从经济和效率上考虑本系统选用SQLServer2005数据库。本系统

java在线考试系统课程设计

目录 第一章引言.............................................. 1.1目的 ............................................... 1.2名词解释 ........................................... 1.3参考资料 ........................................... 1.4文档结构 ...........................................第2章 ............................................................................................... 远景 2.1项目概述 ........................................... 2.1.1................................................................... 项目功能结构 2.1.2........................................................................... 功能摘要 2.1. 3........................................................................... 用户特点 2.1.4........................................................................... 业务模型第3章 ........................................................................................ 需求分析 3.1功能需求 ........................................... 3.1.1........................................................................... 系统管理 3.1.2........................................................................... 题库管理 3.1.3........................................................................... 组卷管理 3.1. 4........................................................................... 试卷管理 3.1.5........................................................................... 在线考试 3.1.6.................................................................................. 批卷

在线考试系统 ,简单java代码

Online Exam Questions(在线银行考试系统,简单java代码) ***************************************************************Index.java import java.io.BufferedReader; import java.io.InputStreamReader; public class Index { static int adminMenu() { int choice = 0; try { BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); System.out.println("1 . Register Qustions"); System.out.println("2 . Start Exam"); System.out.println("3 . Get out"); choice = Integer.parseInt(br.readLine()); } catch (Exception e) { System.out.println("Enter is error"); } return choice; } public static void main(String[] args) { System.out.println("Welcome to Online Exam System"); int choice; do { choice = adminMenu(); switch (choice) { case 1: Questions br = new Questions(); br.QuestionList(); break; case 2: Questions temp = new Questions(); temp.exam(); break; } } while (choice != 3); System.out.println("Thank You !!!");

JAVA在线考试系统的设计与实现

《JA V A》在线考试系统设计和实现 摘要 在网络技术逐步渗透社会生活各个层面今天,传统考试方法也面临着变革,而网络考试则是一个很关键方向。基于试题库管理系统是传统考场延伸,加上数据库技术利用,大大简化了传统考试过程。所以网络考试系统是电子化教学不可缺乏一个关键步骤。所以现在很好考试方法为网络考试,考生经过姓名、准考证号码或口令进行登录,试卷能够依据题库中内容即时生成,可避免考试前压题;而且能够采取大量标准化试题,从而使用计算机判卷,大大提升阅卷效率;还能够直接把成绩送到数据库中,进行统计、排序等操作。所以,采取网络考试方法将是以后考试发展趋势。 本文关键介绍了试题库管理系统需求分析,总体设计和具体设计过程。利用JSP技术开发实现了试题库管理系统,它含有用户登录验证、用户在线考试、动态随机出题、自动判卷、用户管理、试卷管理、成绩管理等功效。论文关键叙述一个功效强大再线考试系统后台操作和部分关键技术。该系统考生信息关键由学生注册生成,考试时考生输入用户名,查对正确后进入考生界面,考生截面关键有正式考试,自动评分组成,关键实现了考生在注册以后进入考试窗体,考试计时,考试时间到,及考完后对试卷自动评分,存档。管理员进入管理员界面,管理员界面关键由科目管理,用户管理,成绩管理等模块组成。 关键词试题;管理;分析

Abstract Gradually infiltrated into the network at all levels of social life today, the traditional test methods are also faced with change, and the network test is a very important direction. Web-based test system is an extension of the traditional test, coupled with the use of database technology has greatly simplified the traditional examination process. Therefore the network test system is indispensable for e-teaching an important part. Therefore, the examination method is better for the network test, candidates have passed the name, ticket number or password to log in, papers based on the content of questions in real-time generation, can avoid the pressure of the title before the exam; and a large number of standardized test can be used in order to use computer grading has greatly enhanced the efficiency of marking; results can also be sent directly to the database, statistics, sorting and other operations. Therefore, the way a network will be the examination after the examination of trends in development. This paper introduces students to the examination system needs analysis, design and detailed design process. The use of JSP technology development to achieve the examination system, it has a user login authentication, users online examinations, dynamic random questions, automatic grading, user management, test management, performance management and other functions. The main thesis of a powerful line of re-examination system, as well as the background to operate a number of key technologies. The main candidates of the system of information generated by students, examination candidates to enter a user name, matching the right candidates into the interface section of the main candidates have a formal examination, automatic score components, the key achievement of the candidates after the registration form to enter the examination, the examination time examination time, and the finished paper automatically after the score, archiving. Administrator to enter the administrator interface, the administrator interface by subject management, user management, performance management module. Keywords Questions; management; analysis

JAVA考试系统程序代码

JAVA考试系统程序代码 登录界面代码: import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.sql.*; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.*; public class Login extends Frame implements ActionListener { Label lbuser,lbpwd; Label lbinstrution=new Label("抱歉,该用户名不存在!"); Label lbinstrution1=new Label("抱歉,该用户口令不正确!"); TextField tfuser,tfpwd; Button btnok,btnreg; String s1,s2;//用来取文本框中的字符串. public Login() { super("考生登录系统界面"); setBounds(340,190,400,300); setLayout(null); setVisible(true); Image image = Toolkit.getDefaultToolkit().getImage("./images/Login.jpg"); Icon icon = new ImageIcon(image); //添加全景图 JLabel lbwhole=new JLabel(icon); lbinstrution.setFont(new Font("华文行楷",Font.BOLD,14)); lbinstrution1.setFont(new Font("华文行楷",Font.BOLD,14)); lbuser=new Label("用户名",Label.CENTER); lbuser.setFont(new Font("华文行楷",Font.BOLD,12)); lbpwd=new Label("口令",Label.CENTER); lbpwd.setFont(new Font("华文行楷",Font.BOLD,12)); tfuser=new TextField(16); tfpwd=new TextField(16); tfpwd.setEchoChar('*'); btnok=new Button("登录"); btnok.setForeground(Color.red); btnok.setFont(new Font("华文行楷",Font.BOLD,12)); btnok.setBackground(new Color(213,219,246));

在线考试系统__简单java代码

Online Exam Questions() ***************************************************************Index.java import java.io.BufferedReader; import java.io.InputStreamReader; public class Index { static int adminMenu() { int choice = 0; try { BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); System.out.println("1 . Register Qustions"); System.out.println("2 . Start Exam"); System.out.println("3 . Get out"); choice = Integer.parseInt(br.readLine()); } catch (Exception e) { System.out.println("Enter is error"); } return choice; } public static void main(String[] args) { System.out.println("Welcome to Online Exam System"); int choice; do { choice = adminMenu(); switch (choice) { case 1: Questions br = new Questions(); br.QuestionList(); break; case 2: Questions temp = new Questions(); temp.exam(); break; } } while (choice != 3); System.out.println("Thank You !!!");

在线考试系统JAVA

题目在线考试系统 1、实验目的 ①熟练运用JAVA开发环境及工具、并用JAVA语言编写程序; ②掌握面向对象的概念; ③掌握系统功能模块的合理划分,并实现各模块接口的连接; ④掌握C/S结构的编程方法; ⑤设计数据库模型。 2、实验容 ①编辑生成试题库,随机生成本次考试试题,同时提供在线评分并保存结果。 ②选择ACCESS作为后台的数据库。 3、实验过程 3.1 题库管理:用于对单个试题的增、删、改、查等基本维护,还可对题库进行数据备份和数据还原。我们针对不同题型、不同应用围及不同科目对试题进行维护。试卷管理:可进行三种组卷方式的维护:随机组卷、人工组卷、综合组卷。还可对考生的基本信息进行维护。 考试管理:对考试分配试卷,并对考试的基本信息进行维护。相当于人工安排考试的过程 评卷管理:对试卷的客观题分配评卷人,并对评卷人基本信息进行管理。 成绩管理:对每次考试的学生成绩的基本信息进行维护,并提供学生成绩的统计管理。 用户管理:对使用本系统的用户基本信息进行维护,用户多数为:系统管理员、

老师、教务处人员、其他 权限管理:对系统的访问权限进行管理,并对用户可进行权限的分配。 系统应该具备的基本功能 各模块需完成以下功能: 题型维护:对试题的题型进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 围维护:对试题的应用围进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 科目维护:对试题的科目进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 试题维护:对试题的基本信息进行增、删、改、查操作。在操作之后会自动刷新主页,以使信息更新。 其他维护:对试题信息的批量查询,并可进行数据导出、数据备份、数据恢复。

基于Java的在线考试系统的设计与实现

基于Java的在线考试系统的设计与实现 本科毕业设计

目录 摘要 (5) Abstract (6) 第一章引言 (1) 1.1课题背景 (1) 1.2课题目的和意义 (1) 1.3本文结构 (2) 第二章系统应用的关键技术 (2) 2.1JSP技术介绍 (2) 2.1.1 JSP的概述 (2) 2.1.2 JSP的运行机制 (2) 2.1.3 JSP的强势与劣势 (3) 2.1.4 JSP与ASP的比较 (4) 2.2 Java组件JavaBeans (5) 2.2.1 什么是JavaBeans (5) 2.2.2 JSP与JavaBeans的关系 (6) 2.3 J2EE概述 (6) 2.4关于Struts (8) 2.4.1 Struts简介 (8) 2.4.2 Struts的主要功能 (8) 2.5.3 Spring带给我们什么 (13) 2.6 关于B/S开发模式 (14)

2.6.1为什么引入B/S开发模式 (14) 2.7 MYSQL数据库 (15) 2.7.1 mysql的特点 (15) 2.7.2 mysql的安装和配置(部分截图)[12] (15) 2.8 Tomcat服务器 (18) 2.8.1 Tomcat 服务器简介 (18) 2.8.2 Tomcat的特点 (18) 2.8.3 Tomcat的优势 (19) 2.8.4 Tomcat服务器的安装和配置 (19) 小结 (20) 第三章系统需求分析和总体设计 (20) 3.1 系统功能需求 (21) 3.2 系统角色及其功能分析 (21) 3.2.1 系统的2个角色: (21) 3.2.2 系统角色的功能 (21) 3.3 总体设计思想概述 (22) 3.4 数据库设计 (23) 3.4.1 E-R图 (23) 3.4.2数据表的设计 (24) 3.5 系统的类设计 (27) 3.5.1 DAO类设计 (27) 3.5.2 connDB类设计(部分) (28) 3.5.3 过滤器类设计 (28) 3.5.4 监听器类设计 (29) 3.6系统的用例图 (30) 3.6.1 总体用例分析 (30) 3.6.2 用户管理用例分析 (31)

基于JAVA的在线考试系统方案

本科生毕业设计报告 课题:基于java的在线考试系统 作者: 专业: 班级: 指导教师:

2012 年04 月02 日

摘要 在线考试系统与传统考试相比,可以实现考务工作的全自动化管理,并有效地利用校园网的软硬件资源,实现考试的客观性和公证性;自动化组卷、阅卷、判分的流程更是大大的减轻教师的工作强度。在线考试系统旨在实现考试的无纸化管理,基于计算机和网络技术进行在线考试系统的使用,方便校方对考试的管理。 本程序是基于eclipse的在线考试系统,利用MVC架构编写,将功能分为3个模块,分别是视图,模型和控制器。将数据分为3个层次,分别为UI层,业务层,实体数据层,各层之间模块独立化,便于数据管理,易于系统维护 关键词: Eclipse,MVC架构,Java语言,三层结构。 Abstract Compared with the traditional test, online examination can realize the automation management work of the thesis, and effective use of the software and hardware of the campus network resources, realizing the objectivity of the exam and real; Automation group rolls, scoring, the process is the scores were greatly reduce teachers working strength. On-line examination system designed to achieve examination of the paperless management, based on the computer and network technology online examination system use, convenient to school examination management. The program is based on the eclipse of the online examination system, with the MVC framework to write, will function is divided into three modules, respectively is the view, model and the controller. Data is divided into three

java在线考试系统设计报告

课程设计报告 课程名称 java程序设计之网络编程 题目 java课程在线考试系统 专业信息管理与信息系统 班级 组长 副组长 组员 指导教师 完成时间 2015年1月12日

目录 第一章引言 (3) 1.1编写目的 (3) 1.2 背景 (3) 第二章系统总的概述 (4) 2.1 系统的目标 (4) 第三章功能需求 (4) 3.1主要用户类型以及系统功能模块 (4) 3.2数据库的流程图 (5) 3.3数据管理能力要求 (6) 3.4故障处理要求 (6) 第四章运行环境要求 (7) 4.1 硬件及软件设备的要求 (7) 4.2开发工具 (7) 第五章项目总结 (7)

1.引言 1.1编写目的 随着计算机应用的迅猛发展,网络应用不断扩大,如远程教育和虚拟大学的出现等等,且这些应用正逐步深入到千家万户。人们迫切要求利用这些技术来进行在线考试,以减轻教师的工作负担及提高工作效率,与此同时也提高了考试的质量,从而使考试更趋于公证!客观!更加激发学生的学习兴趣。 1.2 背景 随着网络技术的飞速发展,现在很多国内外的大学和社会其他部门都已经开设了远程教,于此网络化教育代表了应试教育改革的一个发展方向,已经成为现代教育的一个特征,并对教育的发展形成新的推动力。远程教育成为现代教育技术及未来发展的重要方向之一,但是,远程教育软件的开发目前还处于起步阶段,随着这项技术的不断深入发展,就要求有更好、更完善的软件系统应用到远程教育当中去,这就给软件设计人员提出了更高的设计要求。 网络技术的发展使得考试的技术手段和载体发生了革命性的变化,网络的开放性、分布性的特点和基于Internet的巨大的计算能力使得考试突破了时间和空间的限制。与传统考试模式相比,在线考试具有无可比拟的优越性,它可以将传统考试过程中的试卷组织、审定印制、收集、登记发放、评判归档各个环节缩小到一至两个环节,几乎屏蔽了所有人工直接干预考试活动的可能性,不但能够节约大量的时间、人力、物力与财力,而且还可以大幅度增加考试成绩的客观性和公正性。 传统的考试方式一般要经过五个步骤,即人工出题、考生考试、人工阅卷、成绩评估和试卷分析。显然,随着考试类型的不断增加及考试要求的不断提高,教师的工作量将会越来越大,并且其工作将是一件十分烦琐和非常容易出错的事情,可以说传统的考试方式已经不能适应现代考试。在线考试系统项目的产生:是当今教育信息化发展的趋势以及建设我国高校教育信息化系统,其目的是充分利用学校现有的计算机软、硬件和网络资源实现网络化考试以避免传统笔试考试的不足。与传统考试模式相比,网上考试渗入了更多的技术环节,对实现安全性的途径、方法也提出了更高的技术要求。通过Internet来实现网上考试,是现代教育技术的一个具体实现,具有很重要的现实意义。可以实现远程教育和在线

相关主题