JAVA考试系统程序代码

JAVA考试系统程序代码
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));

btnreg=new Button("注册");

btnreg.setForeground(Color.red);

btnreg.setFont(new Font("华文行楷",Font.BOLD,12));

btnreg.setBackground(new Color(213,219,246));

addWindowListener(new WindowAdapter(){

public void windowClosing(WindowEvent e){

dispose();

System.exit(0);

}

});

add( lbwhole);

add(lbinstrution);add(lbinstrution1);

add( lbuser);add( lbpwd);

add(tfuser); add(tfpwd);//添加组件

add(btnok); add(btnreg);

lbinstrution.setBounds(130,64,152,18);

lbinstrution.setForeground(Color.red);

lbinstrution.setVisible(false);

lbinstrution1.setBounds(130,182,152,18);

lbinstrution1.setVisible(false);

lbinstrution1.setForeground(Color.red);

lbwhole.setBounds(0, 0,400, 300);

lbuser.setBounds(100,100,65,17);

lbpwd.setBounds(100,150,65,17);

tfuser.setBounds(190,100,100,20);

tfpwd.setBounds(190,150,100,20);

btnok.setBounds(100,220,60,20);

btnreg.setBounds(260,220,60,20);

btnok.addActionListener(this);//添加系列监听器

btnreg.addActionListener(this);//添加系列监听器

}

public static void main(String[] args)

{

Login f=new Login(); }

public void actionPerformed(ActionEvent e)

{

if(e.getSource()==btnok)

{if(tfuser.getText().equals("")||tfpwd.getText().equals("")) JOptionPane.showConfirmDialog(null,"用户名和密码不能为空"); else{

s1=tfuser.getText();s2=tfpwd.getText();

try {

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:SQL","sa","");

Statement fsg=con.createStatement();

ResultSet rsuser=fsg.executeQuery("use Date select username,password from admin ");

while(rsuser.next())

{

//System.out.print(rspwd.getString(1)+"\t");

//System.out.print(rsname.getString(2)+"\t");

// System.out.println(rsname+"/n");

String rs=rsuser.getString("username");

String rs2=rsuser.getString("password");

if(s1.equals(rs)&&(s2.equals(rs2)))//只有用户名与密码都与之匹配才能进入考试

{new Testexam();

System.out.println("successs");

break;}

if((s1.equals(""))&&(!(s1.equals(rs))))//提示你没有用户名.//取不等的方法直接在前面加"!".

{lbinstrution.setVisible(true);}

if(s1.equals(rs)&&!s2.equals(rs2))//提示你你的密码错误.

{lbinstrution1.setVisible(true);}

}

rsuser.close();

fsg.close();

con.close();

} catch (ClassNotFoundException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

} catch (SQLException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

}

}//if的结束标记符.

if (e.getSource()==btnreg)

new Register( );

}

}

注册界面代码:

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.event.WindowAdapter;

import java.awt.event.WindowEvent;

import https://www.360docs.net/doc/7919042076.html,.*;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.sql.Statement;

import javax.swing.Icon;

import javax.swing.ImageIcon;

import javax.swing.JLabel;

public class Register extends Frame implements ActionListener

{

Label lbuser,lbpwd,lbpwdensure;

TextField tfuser,tfpwd,tfpwdensure;

Button btnok,btnre;

String name,pwd0,pwd1;//用来取文本框中的字符串.

Label lbinstrution2=new Label("抱歉,用户名不能为空!");

Label lbinstrution3=new Label("抱歉,前后输入的密码不一致!");

public Register()

{

super("考生注册系统界面");

setBounds(340,190,400,300);

setLayout(null);

setVisible(true);

lbinstrution2.setVisible(false);

lbinstrution2.setFont(new Font("华文行楷",Font.BOLD,14));

lbinstrution3.setVisible(false);

lbinstrution3.setFont(new Font("华文行楷",Font.BOLD,14));

Image image = Toolkit.getDefaultToolkit().getImage("./images/Register.jpg"); Icon icon = new ImageIcon(image); //添加全景图

JLabel lbwhole=new JLabel(icon);

lbuser=new Label("用户名",Label.CENTER);

lbuser.setFont(new Font("华文行楷",Font.BOLD,12));

lbpwd=new Label("口令",Label.CENTER);

lbpwd.setFont(new Font("华文行楷",Font.BOLD,12));

lbpwd.setFont(new Font("华文行楷",Font.BOLD,12));

lbpwdensure=new Label("确认口令");

lbpwdensure.setFont(new Font("华文行楷",Font.BOLD,12)); tfuser=new TextField(16);

tfpwd=new TextField(16);

tfpwd.setEchoChar('*');

tfpwdensure=new TextField(16);

tfpwdensure.setEchoChar('*');

btnok=new Button ("提交");

btnre=new Button("返回");

addWindowListener(new WindowAdapter(){

public void windowClosing(WindowEvent e){

dispose();

System.exit(0);

}

});

add(lbwhole);

add(lbinstrution2);add(lbinstrution3);

lbwhole.setBounds(0, 0,400, 300);

add(lbuser); add(lbpwd);add(lbpwdensure);

add(tfuser); add(tfpwd);add(tfpwdensure);//添加组件

add(btnok); add(btnre);

lbinstrution2.setBounds(130,54,146,18);

lbinstrution2.setForeground(Color.red);

lbinstrution3.setBounds(94,214,192,18);

lbinstrution3.setForeground(Color.red);

lbuser.setBounds(100,80,60,17);

lbpwd.setBounds(100,130,60,17);

lbpwdensure.setBounds(100,180,60,17);

tfuser.setBounds(190,80,90,20);

tfpwd.setBounds(190,130,90,20);

tfpwdensure.setBounds(190,180,90,20);

btnok.setBounds(90,240,60,20);

btnok.setForeground(Color.red);

btnok.setBackground(new Color(213,219,246));

btnok.setFont(new Font("华文行楷",Font.BOLD,12)); btnre.setBounds(250,240,60,20);

btnre.setForeground(Color.red);

btnre.setBackground(new Color(213,219,246));

btnre.setFont(new Font("华文行楷",Font.BOLD,12)); btnok.addActionListener(this);//添加提交监听器

btnre.addActionListener(this);//添加系列监听器

}

public static void main(String[] args) {

Register f=new Register();

}

public void actionPerformed(ActionEvent e)

{

name=tfuser.getText();pwd0=tfpwd.getText();pwd1=tfpwdensure.getText();

if(e.getSource()==btnok)

{

try {

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:SQL","sa","");

Statement fsg=con.createStatement();

//ResultSet rsname=fsg.executeQuery("use Teacher select * from admin ");

//int n=fsg.executeUpdate("delete from admin where username='thanki'" );

if(!(name.equals("")))//&&(!(pwd.equals("")))//只有用户名与密码都不为空才能进行添加

{

//int s1=Integer.parseInt(name);int s2=Integer.parseInt(pwd0);

fsg.executeUpdate("insert into admin values('"+name+"' ,'"+pwd0+"')" );

System.out.println("successs");

}

if(name.equals(""))//提示用户名不能为空.

{lbinstrution2.setVisible(true);}

if(!(pwd0.equals(pwd1)))//提示你你前后的密码不一致.

{lbinstrution3.setVisible(true);}

fsg.close();

con.close();

} catch (ClassNotFoundException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

} catch (SQLException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

}////if的结束标记符.

if(e.getSource()==btnre)

new Login();

}

}

考试答题界面代码:

//定义线程,千万不要把定义的初始变量到构造函数以外.否则构造函数就会出错.

import java.awt.event.*;

import java.awt.*;

import java.io.*;

import java.util.Calendar;

import java.util.Date;

import javax.swing.*;

class Testexam extends Frame implements ActionListener,ItemListener,Runnable {

Thread ttime=new Thread(this);

int hour,minute,second=00,unsecond,totaltime=5400;

Panel pnor=new Panel();

Panel pwes=new Panel();

Panel pcen=new Panel();//东南面板被标签图片所取代了.

public String []strtm=new String [200];

String correctAnswer="",selectedcode="",selectedanswer="",wrongNumber="";//定义要用的字符串量

String rightAnswer ="";//仅仅在看看答案时调用它。实质它等同于"correctAnswer" public int n=0;

public int l;//用来记题号的下标.

public int score,count=0;//定义计分与统计所做的正确题数.

Checkbox ck[]=new Checkbox[5];//答案的四个复选按钮

Choice cetimu=new Choice ();

Choice cexuti=new Choice ();

File file1=new File("./timu");

Label lbtime=new Label(" ");

Label lchoiceti =new Label("-----------------欢迎您来参加考试-----------------------");

Label lanswer=new Label("答案选项:");

Label lbactivexuti=new Label("选题:");

Image image = Toolkit.getDefaultToolkit().getImage("./images/peas.jpg");

Icon icon = new ImageIcon(image); //添加东图

JLabel lbpiceast=new JLabel(icon);

Image image1 = Toolkit.getDefaultToolkit().getImage("./images/psou.jpg");

Icon icon1 = new ImageIcon(image1); //添加南图

JLabel lbpicsou=new JLabel(icon1);

CheckboxGroup cg=new CheckboxGroup();

TextArea ta=new TextArea("", 10,10,TextArea.SCROLLBARS_VERTICAL_ONLY);

JButton btnstar=new JButton(new ImageIcon("./images/picstar.jpg"));

JButton btnpractice=new JButton(new ImageIcon("./images/picpractice.jpg")); Button btnuper=new Button("上一题");

Button btnnex=new Button("下一题");

Button btnanswer = new Button("看看答案");

Button btnover=new Button("结束考试");

Button btnstop=new Button("结束练习");

public Testexam ()

{

super ("考试系统");

setBounds(130,80,800,600);

setLayout(null);

setVisible(true);

ImageIcon YouImg=new ImageIcon("iconimage.jpg");

setIconImage(YouImg.getImage());

//ttime.start();//启动线程式

addWindowListener(new WindowAdapter(){

public void windowClosing(WindowEvent e){

dispose();

System.exit(0);

}

});

//布局好所有的面板并赋予某些变量部分空间并添加组件:

add(pnor);pnor.setBounds(0,0,800,100);pnor.setLayout(null);

pnor.setBackground( new Color(213,219,246));

pnor.add(lchoiceti);lchoiceti.setBounds(220,35,350,25);

lchoiceti.setFont(new Font("华文行楷",Font.BOLD,18));

lchoiceti.setForeground(Color.blue);

add(pwes);pwes.setBounds(0,100,120,400); pwes.setLayout(null); pwes.setBackground(new Color(219,209,158));

add(pcen);pcen.setBounds(100,100,580,400); pcen.setLayout(null); pcen.setBackground(Color.yellow);

add(lbpiceast);this.lbpiceast.setBounds(680,100,124,400);

add(lbactivexuti);lbactivexuti.setBounds(721,160,40,17);

lbactivexuti.setFont(new Font("华文行楷",Font.BOLD,15));

lbactivexuti.setForeground(new Color(49,85,182));

add(cexuti);

cexuti.addItemListener(this);//加所有组件的监听器.

cexuti.setVisible(true);//先设置选题为隐藏,当.................. cexuti.setBounds(695,185,90,60);cexuti.setForeground(new

Color(49,85,182));

cexuti.setFont(new Font("华文行楷",Font.BOLD,15));

int []init=new int[75];

for(int k=1;k<=init.length;k++)

cexuti.add(" "+"第"+k+"道题");

add(lbpicsou);lbpicsou.setBounds(0,500,800,100);

ck[0]=new Checkbox("A",cg,false);

ck[0].setFont(new Font("华文行楷",Font.BOLD,15));

ck[1]=new Checkbox("B",cg,false);

ck[1].setFont(new Font("华文行楷",Font.BOLD,15));

ck[2]=new Checkbox("C",cg,false);

ck[2].setFont(new Font("华文行楷",Font.BOLD,15));

ck[3]=new Checkbox("D",cg,false);

ck[3].setFont(new Font("华文行楷",Font.BOLD,15));

ck[4]=new Checkbox("E",cg,false);

ck[4].setFont(new Font("华文行楷",Font.BOLD,15));

pwes.add(lanswer) ; lanswer.setBounds(30,35,70,35);

lanswer.setFont(new Font("华文行楷",Font.BOLD,15));

lanswer.setBackground(Color.ORANGE);lanswer.setAlignment(Label.CENTER); pwes.add(ck[0]);ck[0].setBounds(40,100,50,30);

pwes.add(ck[1]);ck[1].setBounds(40,145,50,30);

pwes.add(ck[2]);ck[2].setBounds(40,190,50,30);

pwes.add(ck[3]);ck[3].setBounds(40,235,50,30);

pwes.add(ck[4]);ck[4].setBounds(40,285,50,30);

ck[4].setVisible(false);

ck[0].addItemListener(this);//加四个选项的监听器

ck[1].addItemListener(this);

ck[2].addItemListener(this);

ck[3].addItemListener(this);

pwes.add(btnstar);btnstar.setBounds(30,285,70,45);

btnstar.addActionListener(this);//加开始菜单的监听器.

//btnstar.setForeground(Color.red);btnstar.setBackground(Color.pink); pwes.add(btnpractice);btnpractice.setBounds(30,345,70,45);

btnpractice.addActionListener(this);

btnpractice.setForeground(Color.red);btnpractice.setBackground(Color.pink); pcen.add(ta);ta.setBounds(25,5,550,390);

//ta.setBackground(Color.white);

add(btnuper); btnuper.setBounds(100,530,90,40);

btnuper.addActionListener(this);//加上"上一题"的监听器

btnuper.setForeground(Color.red);btnuper.setBackground(Color.orange);

btnuper.setFont(new Font("华文行楷",Font.BOLD,20));

add(btnnex); btnnex.setBounds(260,530,90,40);

btnnex.addActionListener(this); // 加上"下一题"的监听器

btnnex.setFont(new Font("华文行楷",Font.BOLD,20));

btnnex.setForeground(Color.red);btnnex.setBackground(Color.orange);

add(btnanswer); btnanswer.setBounds(400,530,90,40);

btnanswer.setForeground(Color.red);btnanswer.setBackground(Color.orange); btnanswer.addActionListener(this); // 加上"标准答案"的监听器

btnanswer.setFont(new Font("华文行楷",Font.BOLD,20));

add(btnover); btnover.setBounds(540,530,90,40);

add(btnstop); btnstop.setBounds(540,530,90,40);btnstop.setVisible(false);//默认隐藏"结束练习"起来

btnover.addActionListener(this);btnstop.addActionListener(this);// 加上"结束考试"、"结束练习"的监听器

btnover.setForeground(Color.red);btnover.setBackground(Color.orange);

btnstop.setForeground(Color.red);btnstop.setBackground(Color.orange);

btnover.setFont(new Font("华文行楷",Font.BOLD,20));

btnstop.setFont(new Font("华文行楷",Font.BOLD,20));

pnor.add(cetimu);cetimu.addItemListener(this);//加所有组件的监听器.

cetimu.setBounds(190,65,400,120);

cetimu.setFont(new Font("华文行楷",Font.BOLD,14));

cetimu.setBackground(Color.lightGray);

pnor.add(lbtime);lbtime.setBounds(683,60,70,25);

lbtime.setBackground(Color.white);

lbtime.setFont(new Font("华文行楷",Font.BOLD,15));

//lbtime.setText(" "+hour+":"+minute+":"+unsecond);

String[] str1=new String[100];

str1=file1.list();

for(int i=0;i

{cetimu.add(str1[i]);

}

this.validate();

readQuestions();

}

String str;

public void itemStateChanged(ItemEvent e)

{

if(e.getItemSelectable()==cetimu)

{

str=cetimu.getSelectedItem();

}

if(e.getItemSelectable()==cexuti)

{

l=(cexuti.getSelectedIndex());//选题的索引计值.

//if(cexuti.getSelectedIndex()==l)//定义一个下标索引值

//{

n=l;

ta.setText(strtm[n]);

}//}

if(e.getSource()==ck[0])//选答案实现小事件。

{

selectedcode="A";

}

if(e.getSource()==ck[1])

{

selectedcode="B";

}

if(e.getSource()==ck[2])

{

selectedcode="C";

}

if(e.getSource()==ck[3])

{

selectedcode="D";

}

if((ck[0].getState()==false)&&(ck[1].getState()==false)&&(ck[2].getState()==fals e)&&(ck[3].getState()==false))

selectedcode="?";//没选答案就跳过去了。

//System.out.println(selectedcode);

}

public void actionPerformed(ActionEvent e)

{

if (e.getSource()==btnstar)

{ btnpractice.setVisible(false);

readQuestions();

ttime.start();

cetimu.setEnabled(false);

btnanswer.setEnabled(false);

}

if (e.getSource()==btnpractice)

{ btnstar.setVisible(false);

readQuestions();

ttime.start();

cetimu.setEnabled(false);

cetimu.setEnabled(false);

btnover.setVisible(false);

btnstop.setVisible(true);

}

if(e.getSource()==btnuper)

{

this.ta.setText(this.strtm[this.n]);

if(this.n>this.strtm.length-1||this.n<0)

return ;

n--;

ta.setText(strtm[n]);

}

if (e.getSource()==btnnex)

{

selectedanswer+=selectedcode;

selectedcode="?";

ck[4].setState(true);

this.ta.setText(this.strtm[this.n]);

if(this.n>this.strtm.length-1||this.n<0)

return ;

n++;

ta.setText(strtm[n]);

this.btnanswer.setLabel("看看答案");

}

if (e.getSource()==btnanswer)

{ getAnswer();

// int m=str.indexOf("、");//获取每一题的答案,先获取题号。

//String s2=str.substring( 0,m);//通过截取标号来获取题号,但这里有点失效。 //int c=Integer.parseInt(s2);

char f=rightAnswer.charAt(n);

btnanswer.setLabel(" "+f);}

if (e.getSource()==this.btnover)

{ttime.stop();

this.btnuper.setEnabled(false);

this.btnnex.setEnabled(false);

this.btnstar.setEnabled(false);

this.ta.setEditable(false);

cexuti.setEnabled(false);

btnstar.setEnabled(false);

btnover.setEnabled(false);

getScore(); }

if (e.getSource()==btnstop)

{

if(n<=75)

{selectedanswer+=selectedcode;

ttime.stop();

this.btnuper.setEnabled(false);

this.btnnex.setEnabled(false);

this.btnpractice.setEnabled(false);

this.ta.setEditable(false);

this.cexuti.setEnabled(false);

this.btnanswer.setEnabled(false);

btnstop.setEnabled(false);

getScore(); }

if(n>75)

{

ttime.stop();

this.btnuper.setEnabled(false);

this.btnnex.setEnabled(false);

this.btnpractice.setEnabled(false);

this.ta.setEditable(false);

this.cexuti.setEnabled(false);

this.btnanswer.setEnabled(false);

btnstop.setEnabled(false);

getScore(); }

}

}

//构造读题方法。

public void getAnswer()

{

try {

FileReader fr=new FileReader("./answer/"+"答案"+str);//只读答案方法。 BufferedReader bufr1=new BufferedReader(fr,4096);

String s1;

while (( s1=bufr1.readLine())!=null)

{

rightAnswer+=s1;

}

bufr1.close();

} catch (FileNotFoundException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

public void readQuestions()

{

try {

FileReader fr=new FileReader("./timu/"+str);

BufferedReader bufr=new BufferedReader(fr,4096);

ta.setText("");

String texts="",s;

this.strtm[0]="";

while (( s=bufr.readLine())!=null)

{

ta.setFont(new Font("宋体",Font.PLAIN,14));

texts+=s+"\n";

}

this.strtm=texts.split("●");

ta.setText(strtm[0]);

bufr.close();

} catch (IOException e1) {System.out.println(e1.toString());} }

public void run()

{

try{

while(true)

{

totaltime--;

second++;

hour=totaltime/3600;

minute=(totaltime-3600*hour)/60;

second=(totaltime-3600*hour-60*minute);

Thread.sleep(1000);

lbtime.setText(" "+hour+":"+minute+":"+second);

}

}

catch(InterruptedException excepton){}

}

public static void main(String[] args)

{

Testexam f= new Testexam ();

}

public void getScore()//算分统计方法.

{

score=0;

try {

FileReader fr=new FileReader("./answer/"+"答案"+str);

BufferedReader bufr1=new BufferedReader(fr,4096);

String s1;

while (( s1=bufr1.readLine())!=null)

{

correctAnswer+=s1;

}

bufr1.close();

} catch (FileNotFoundException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

int len1=selectedanswer.length() ;

int len2=correctAnswer.length() ;

int len=Math.min(len1,len2);

for(int i=0;i

if(selectedanswer.charAt(i)==correctAnswer.charAt(i))

{score++;}

else

{wrongNumber+=(i+1+"、");}

}ta.setText("你做错第"+wrongNumber+"道题目"+"\n你的得分:"+score+"\n标准答案:\n"+correctAnswer);

}

}

??

??

??

??

在线考试系统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在线考试系统课程设计

目录 第一章引言 (2) 1.1目的 (2) 1.2名词解释 (3) 1.3参考资料 (3) 1.4文档结构 (3) 第2章远景 (4) 2.1项目概述 (4) 2.1.1项目功能结构 (4) 2.1.2功能摘要 (5) 2.1.3用户特点 (5) 2.1.4业务模型 (5) 第3章需求分析 (6) 3.1功能需求 (6) 3.1.1系统管理 (6) 3.1.2题库管理 (6) 3.1.3组卷管理 (6) 3.1.4试卷管理 (6) 3.1.5在线考试 (6) 3.1.6批卷 (7) 3.1.7信息统计 (7) 3.2非功能需求 (7) 3.2.1访问控制 (7) 第4章体系结构 (8) 4.1逻辑视图 (8) 4.2流程视图............................................ 错误!未定义书签。 4.3数据库结构.......................................... 错误!未定义书签。第5章设计实现 (9) 5.1 5.1系统管理 (9) 5.2 5.2试题题型........................................ 错误!未定义书签。 5.2.1单选题........................................ 错误!未定义书签。 5.2.2多选题........................................ 错误!未定义书签。 5.2.3判断题........................................ 错误!未定义书签。 5.2.4填空题........................................ 错误!未定义书签。 5.2.5问答题........................................ 错误!未定义书签。 5.3试卷管理............................................ 错误!未定义书签。 5.4组卷管理............................................ 错误!未定义书签。

基于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_Web的在线考试系统的设计与实现毕业论文 精品

毕业论文 题目:Java Web应用开发—— 在线模拟考试系统的设计与实现学院:计算机与信息工程学院 专业:软件工程

毕业设计(论文)原创性声明和使用授权说明 原创性声明 本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。尽我所知,除文中特别加以标注和致谢的地方外,不包含其他人或组织已经发表或公布过的研究成果,也不包含我为获得及其它教育机构的学位或学历而使用过的材料。对本研究提供过帮助和做出过贡献的个人或集体,均已在文中作了明确的说明并表示了谢意。 作者签名:日期: 指导教师签名:日期: 使用授权说明 本人完全了解大学关于收集、保存、使用毕业设计(论文)的规定,即:按照学校要求提交毕业设计(论文)的印刷本和电子版本;学校有权保存毕业设计(论文)的印刷本和电子版,并提供目录检索与阅览服务;学校可以采用影印、缩印、数字化或其它复制手段保存论文;在不以赢利为目的前提下,学校可以公布论文的部分或全部内容。 作者签名:日期:

学位论文原创性声明 本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律后果由本人承担。 作者签名:日期:年月日 学位论文版权使用授权书 本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。本人授权大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。 涉密论文按学校规定处理。 作者签名:日期:年月日 导师签名:日期:年月日

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语言的在线考试系统设计

摘要 在线考试系统旨在实现考试的无纸化管理,对一些科目的考试可以通过互联网络或局域网进行,方便校方考务的管理,也方便了考生,尤其适合考生分布广,不易集中的远程教育。我主要开发系统的后台管理系统—JAVA在线考试管理系统,它包括试题管理、考生管理、在线制作试卷、控制学生考试的设置、试卷审批等功能。本论文主要介绍了对JAVA在线考试管理系统的分析、设计和开发的全部过程。运用ER图,程序流程图等对在线管理子系统的设计过程进行详细的说明。 全文共分为开发方案、需求分析、系统设计、关键技术解决,结论五部分。开发方案中主要介绍开发在线考试系统得目的、开发方案的选择及开发框架的技术的确定;需求分析介绍了在线考试系统的总体需求及系统各模块的功能需求;系统设计介绍了系统设计的指导思想、数据库的设计、系统模块的设计;关键技术介绍了在具体实现时需解决的一些技术,如开发框架的整合技术、开发框架与数据库的连接及数据的备份与还原。 本毕业设计的内容是设计并且实现一个基于web技术的在线考试系统,故而系统主要以j2EE作为开发基础,主要使用了struts+spring等多种协议或技术,用eclipse作为开发工具,以MYSQL作为数据库,以Macromedia公司的Dreamweaver作为界面美化工具。基本实现了网上考试系统应有的主要功能模块,包括:管理员的登录,管理和维护;用户注册、登录、注销,个人信息的查询、修改;考试管理,套题管理,成绩管理。该系统界面简单、操作方便,容易维护。 关键词:JavaSE;J2EE;MYSQL;在线考试 Abstract Online examination system to achieve paperless management of examinations, the examination of some subjects through the Internet or LAN, to facilitate the management of the school Examination, candidates are also convenient, especially for candidates widely distributed, easy to focus on distance education . The background of my main development system management system-JA V A-line examination management subsystem, which includes questions management, candidate management, on-line production of papers, control of student test set, paper processing and other functions. This paper introduces online examination management subsystem on the JA V A analysis, design and development of the whole process. Using ER diagram, process flow charts and other on-line management subsystem design process detail. Paper is divided into development programs, requirements analysis, system design, key technical solutions, the conclusion of five parts. Development program introduces the development of online examination system was the purpose, development plan and development framework for the choice of identification technology; demand analysis describes the overall demand for online examination system and the system functional requirements of each module; system designed for the guidance system design thinking, database design, system design module; key technology introduced to be addressed in the detailed realization of some technologies, such as the integration of technology development framework, development framework and the database connection and data backup and restore. The contents of this graduation project is to design and implement a web-based technology, online examination system, Guer system based mainly j2EE as the development, mainly using struts + spring and other agreements or technology, using eclipse as a development tool to MYSQL as the database to Macromedia's Dreamweaver as a landscaping tool interface. Basically an online examination system should be the main functional modules, including: an

相关文档
最新文档