简易考试系统

题目页面
用H2标签将问题类型放大
以表格为框架,把题放在表格中,用表单元素radio和checkbox制作题选项
用form标签中的action决定提交后跳转到得分页面

<form action="得分.jsp" method="post">
    <h2>一、判断</h2><br>

    <table>
        <tr>
            <td></td><td>正确</td><td>错误</td>
        </tr>
        <tr>
            <td>1.2008年奥运会在中国北京举行</td><td> <input type="radio" name="pd1" id="pd1" value="1"></td><td><input type="radio" name="pd1" id="pd2"value="2"></td>
        </tr>
        <tr>
            <td>2.民族识别, 是指对一个族体的成分和名称的辨别与确定。</td><td> <input type="radio" name="pd2"value="1"></td><td><input type="radio" name="pd2"value="2"></td>
        </tr>
        <tr>
            <td>3.古尔邦节既是伊斯兰教的节日, 也是信仰伊斯兰教民族的民族节日。</td><td> <input type="radio" name="pd3"value="1"></td><td><input type="radio" name="pd3"value="2"></td>
        </tr>
        <tr>
            <td>4.族体渊源也就是共同族源,是指组成一个民族的人们共同具有氏族、部落等起源的共同性或同源性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td> <input type="radio" name="pd4"value="1"></td><td><input type="radio" name="pd4"value="2"></td>
        </tr>
        <tr>
            <td>5.与理想气体相比,真实气体的相互作用力偏小</td><td> <input type="radio" name="pd5"value="1"></td><td><input type="radio" name="pd5"value="2"></td>
        </tr>
    </table>
    <h2>二、选择</h2><br>
    <table>
        <tr><td colspan="4"> 1.斯大林在( )中提出了完整的马克思主义民族定义</td></tr>
        <tr><td><input type="radio" name="xz1"value="1">A、《崩得在党内的地位》</td><td><input type="radio" name="xz1"value="2">B、《论犹太人问题》</td>
            <td><input type="radio" name="xz1"value="3">C、《神圣家族——或对批判的批判所作的批判》</td><td><input type="radio" name="xz1"value="4">D、《马克思主义与民族问题》</td></tr>
        <tr><td colspan="4"> 2.一般来说,最初民族形成于</td></tr>
        <tr><td><input type="radio" name="xz2"value="1">A、封建主义社会</td><td><input type="radio" name="xz2"value="2">B、资本主义社会</td>
            <td><input type="radio" name="xz2"value="3"> C、原始社会崩溃,氏族、部落瓦解时期</td><td><input type="radio" name="xz2"value="4">D、奴隶制社会</td></tr>
        <tr><td colspan="4"> 3.清代的《嘉庆会典》中曾经把全国的民族构成以"户" 的形式分类为</td></tr>
        <tr><td>  <input type="radio" name="xz3"value="1">A10</td><td><input type="radio" name="xz3"value="2">B15</td>
            <td><input type="radio" name="xz3"value="3"> C20</td><td><input type="radio" name="xz3"value="4">D8</td></tr>
        <tr><td colspan="4">   4.1953年第一次人口普查时, 全国汇总登记的民族名称多达( )多个, 其中仅云南省就达200 多个</td></tr>
        <tr><td> <input type="radio" name="xz4"value="1">A320</td><td><input type="radio" name="xz4"value="2">B260</td>
            <td><input type="radio" name="xz4"value="3"> C460</td><td><input type="radio" name="xz4"value="4">D400</td></tr>
        <tr><td colspan="4"> 5.1979 年,居住在云南西双版纳的( )经识别后得到确认。至此, 自新中国建立以来, 陆续确认了55 个少数民族</td></tr>
        <tr><td> <input type="radio" name="xz5"value="1">A、佤族</td><td><input type="radio" name="xz5"value="2">B、基诺族</td>
            <td><input type="radio" name="xz5"value="3"> C、傣族</td><td><input type="radio" name="xz5"value="4">D、景颇族</td></tr>
    </table>
    <h2>三、多选</h2><br>
    1.侧重于从民族的社会属性上划分,可以将民族划分为<br>
    <input type="checkbox" name="dx1" value="1">A、奴隶制民族、封建主义民族<br>
    <input type="checkbox" name="dx1"value="2">B、现代民族<br>
    <input type="checkbox" name="dx1"value="3">C、古代民族<br>
    <input type="checkbox" name="dx1"value="4">D、资本主义民族、社会主义民族<br>
    <input type="checkbox" name="dx1"value="5">E、近代民族<br>
    2.我国民族识别的依据是<br>
    <input type="checkbox" name="dx2"value="1">A、族体名称<br>
    <input type="checkbox" name="dx2"value="2">B、民族源流<br>
    <input type="checkbox" name="dx2"value="3">C、民族意愿<br>
    <input type="checkbox" name="dx2"value="4">D、民族关系<br>
    <input type="checkbox" name="dx2"value="5">E、民族特征<br>
    3.民族发展一般经历哪些基本发展阶段 ( )<br>
    <input type="checkbox" name="dx3"value="1">A、资本主义民族<br>
    <input type="checkbox" name="dx3"value="2">B、社会主义民族<br>
    <input type="checkbox" name="dx3"value="3">C、封建主义民族<br>
    <input type="checkbox" name="dx3"value="4">D、奴隶制民族<br>
    4.民族发展的基本模式是( )<br>
    <input type="checkbox" name="dx4"value="1">A、异态发展<br>
    <input type="checkbox" name="dx4"value="2">B、跳跃式发展<br>
    <input type="checkbox" name="dx4"value="3">C、间歇性发展<br>
    <input type="checkbox" name="dx4"value="4">D、常态发展<br>
    5.我国属于跳跃式发展的民族是( )<br>
    <input type="checkbox" name="dx5"value="1">A、基洛族<br>
    <input type="checkbox" name="dx5"value="2">B、藏族<br>
    <input type="checkbox" name="dx5"value="3">C、汉族<br>
    <input type="checkbox" name="dx5"value="4">D、彝族<br>
    <input type="submit" value="提交">
</form>

在这里插入图片描述
得分页面
在得分页面用request.getParameter("")方法得到用户所选择做出的选择并用if’语句进行判断
选对用绿色
选错用红色
未选择用蓝色
最后计算出总成绩

int sum=0;
    String t1=request.getParameter("pd1");
    String t2=request.getParameter("pd2");
    String t3=request.getParameter("pd3");
    String t4=request.getParameter("pd4");
    String t5=request.getParameter("pd5");
    String t6=request.getParameter("xz1");
    String t7=request.getParameter("xz2");
    String t8=request.getParameter("xz3");
    String t9=request.getParameter("xz4");
    String t10=request.getParameter("xz5");
    String t11[]=request.getParameterValues("dx1");
    String t12[]=request.getParameterValues("dx2");
    String t13[]=request.getParameterValues("dx3");
    String t14[]=request.getParameterValues("dx4");
    String t15[]=request.getParameterValues("dx5");
    if(t1==null)
    {

    }
    if (t1==null)
    {
        out.print("<p style='color:blue'>1.应选正确</p>");
    }
    else if(t1.equals("1"))
    {
        out.print("<p style='color:green'>1.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>1.错误,应选正确</p>");
    if (t2==null)
    {
        out.print("<p style='color:blue'>2.应选正确</p>");
    }
    else    if(t2.equals("1"))
    {
        out.print("<p style='color:green'>2.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>2.错误,应选正确</p>");
    if (t3==null)
    {
        out.print("<p style='color:blue'>3.应选正确</p>");
    }
    else    if(t3.equals("1"))
    {
        out.print("<p style='color:green'>3.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>3.错误,应选正确</p>");
    if (t4==null)
    {
        out.print("<p style='color:blue'>4.应选正确</p>");
    }
    else    if(t4.equals("1"))
    {
        out.print("<p style='color:green'>4.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>4.错误,应选正确</p>");
    if (t5==null)
    {
        out.print("<p style='color:blue'>5.应选错误</p>");
    }
    else    if(t5.equals("2"))
    {
        out.print("<p style='color:green'>5.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>5.错误,应选错误</p>");
    if (t6==null)
    {
        out.print("<p style='color:blue'>6.应选D</p>");
    }
    else    if(t6.equals("4"))
    {
        out.print("<p style='color:green'>6.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>6.错误,应选D</p>");
    if (t7==null)
    {
        out.print("<p style='color:blue'>7.应选C</p>");
    }
    else
    if(t7.equals("3"))
    {
        out.print("<p style='color:green'>7.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>7.错误,应选C</p>");
    if (t8==null)
    {
        out.print("<p style='color:blue'>8.应选B</p>");
    }
    else
    if(t8.equals("2"))
    {
        out.print("<p style='color:green'>8.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>8.错误,应选B</p>");
    if (t9==null)
    {
        out.print("<p style='color:blue'>9.应选D</p>");
    }
    else
    if(t9.equals("4"))
    {
        out.print("<p style='color:green'>9.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>9.错误,应选D</p>");
    if (t10==null)
    {
        out.print("<p style='color:blue'>10.应选B</p>");
    }
    else
    if(t10.equals("2"))
    {
        out.print("<p style='color:green'>10.正确</p>");
        sum+=5;
    }
    else
        out.print("<p style='color:red'>3.错误,应选B</p>");
    if (t11==null||t11.length<2)
    {
        out.print("<p style='color:blue'>11.应选A和D</p>");
    }
    else

    if(t11[0].equals("1")&t11[1].equals("4"))
    {
        out.print("<p style='color:green'>11.正确</p>");
        sum+=10;
    }
    else
        out.print("<p style='color:red'>11.错误,应选A和D</p>");
    if (t12==null||t12.length<3)
    {
        out.print("<p style='color:blue'>12.应选B、C、E</p>");
    }
    else
    if(t12[0].equals("2")&t12[1].equals("3")&t12[2].equals("5"))
    {
        out.print("<p style='color:green'>12.正确</p>");
        sum+=10;
    }
    else
        out.print("<p style='color:red'>12.错误,应选B、C、E</p>");
    if (t13==null||t13.length<4)
    {
        out.print("<p style='color:blue'>13.应选A、B、C、D</p>");
    }
    else
    if(t13[0].equals("1")&t13[1].equals("2")&t13[2].equals("3")&t13[3].equals("4"))
    {
        out.print("<p style='color:green'>13.正确</p>");
        sum+=10;
    }
    else
        out.print("<p style='color:red'>13.错误,应选A、B、C、D</p>");
    if (t14==null||t14.length<3)
    {
        out.print("<p style='color:blue'>14.应选A、B、D</p>");
    }
    else
    if(t14[0].equals("1")&t14[1].equals("2")&t14[2].equals("4"))
    {
        out.print("<p style='color:green'>14.正确</p>");
        sum+=10;
    }
    else
        out.print("<p style='color:red'>14.错误,应选A、B、D</p>");
    if (t15==null||t15.length<3)
    {
        out.print("<p style='color:blue'>15.应选A、B、D</p>");
    }
    else
    if(t15[0].equals("1")&t15[1].equals("2")&t15[2].equals("4"))
    {
        out.print("<p style='color:green'>15.正确</p>");
        sum+=10;
    }
    else
        out.print("<p style='color:red'>15.错误,应选A、B、D</p>");
    out.print("<p style='color:red;'><font size='100px;'>最后得分"+sum+"</font><p>");

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
铭成在线考试系统 界面预览 图1 系统登录界面 图2 随机抽题界面 图3 试题管理模块界面 图4 后台管理员模块运行界面 使用说明 系统介绍 为了保障整个系统的安全性,在线考试系统实现了分类验证的登录模块,通过此模块,可以对不同身份的登录用户进行验证,确保了不同身份的用户操作系统。在抽取试题上,系统使用随机抽取试题的方式,体现了考试的客观与公正。当考生答题完毕之后,提交试卷即可得知本次考试的得分,体现系统的高效性。在后台管理上,分后台管理员管理模块和试题管理模块。分别适应不同的用户,前者只有系统的高级管理员才能进入,对整个系统进行管理。而后者只允许教师登录,教师可以对自己任教的科目试题进行修改,并且可以查看所有参加过自己任教科目的学生成绩。 操作注意事项 (1)本系统管理员用户名为:zhuyunfeng,密码为:123。 (2)实例执行文件位置:在线考试系统\ Login.aspx (3)本系统共分为三种操作权限,分别为管理员、老师、学生。 操作流程  管理员权限 输入账号、密码后进入管理员管理界面如图9所示。 图9 管理员管理界面 (1)单击“学生信息管理”/“学生基本信息”菜单项,对学生信息进行查询、修改及删除操作。 (2)单击“学生信息管理”/“添加学生信息”菜单项,对学生信息进行添加操作。 (3)单击“教师信息管理”/“教师基本信息”菜单项,对教师信息进行查询、修改及删除操作。 (4)单击“教师信息管理”/“添加教师信息”菜单项,对教师信息进行添加操作。 注意:每个教师只能负责自己的课程,其它课程只能有其他课程教师管理。 (5)单击“试题信息管理”/“试题基本信息”菜单项,对试题信息进行查询、修改及删除操作。 (6)单击“试题信息管理”/“添加试题信息”菜单项,对试题信息进行添加操作。 (7)单击“科目信息管理”/“考试科目设置”菜单项,对考试科目信息进行添加操作,如图10所示。 图10 考试科目设置 (8)单击“考试结果管理”/“考试结果”菜单项,对考试结果进行查询及删除操作,如图11所示。 图11 考试结果 (9)单击“管理员信息维护”/“修改密码”菜单项,对管理员操作密码进行修改操作。  学生权限 学生登录后,只能进行考试答题操作,如图12所示。 图12 学生考试  教师权限 教师登录后,可对试题基本信息进行添加、修改、查询及删除操作。同时对学生考试成绩进行查询及删除操作。如果教师对现有的密码不满意,还可以修改自己的密码,如图13所示。 图13 教师权限
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值