• 基于SSH的高校教师成绩录入系统


    1 系统需求的分析

    1.1需求分析

    本项目所开发的教师成绩录入系统完成教师对学生的成绩信息的统计与管理,减少数据出错的情况,同时也节约人力、物力和财力。方便老师使用,老师可以管理学生的成绩信息。 

    系统模块划分如下

     

     

     

    (1)学生成绩信息添加:现录入所带班级的学生成绩信息。

    (2)学生成绩信息删除:现删除所带班级的学生成绩信息

    (3)学生成绩信息修改:现修改所带班级的学生成绩信息

    (4)学生成绩信息查询:现查询所带班级的学生成绩信息

    1.2 任务概述 

    1.2.1 目标 

    本系统是为了更好管理学生成绩信息而设计的。由于学校的学生多,包含的信息量大且复杂,有必要建立一个学生成绩系统,使成绩录入工作规范化,系统化,程序化,提高信息处理的速度和准确性,能够及时、准确、有效的查询和修改学生成绩信息。 

    1.2.2 运行环境 

    服务器配置包括硬件配置和软件配置,它们各自都有详细的要求,下面将分别进行介绍

    (1)硬件配置

    安装本软件之前,需要确保计算机具有如下配置,这也是最低硬件要求: 酷睿i5或更高的微处理器(或与之相当的处理器) 使用2G内存

    (2)软件配置 

    安装本软件之前,需要确保计算机已安装:Micorsoft Win10的操作系统.

    1.3系统完整性、安全性 

    1.3.1 对服务的要求 

    为保证该系统平稳、安全地运行,系统为用户提供的服务要有以下限制:

    (1)教师可以查看学生的全部信息,修改,添加以及删除学生成绩信息。

    1.3.2 对性能的要求

    此系统的数据输入大多数为字符串类型,也有表示成绩的浮点数,精度为6

     响应时间:对于管理人员输入的用户信息应该在人们所能接受的等待时间来确定,通常为1-2秒。 

    更新处理时间要求 :用户输入数据后,对于该操作人员输入的数据处理时间应该是毫秒级的。数据的转换和传输也应该在人们的接受的等待时间内。 

    灵活行:

    (1) 在操作方式上若发生变化,如无法使用浏览器进入系统,那么,可以使用命令方式进入如:可以通过编写java程序与数据库联接,实现登录。 

    (2) 因为本系统开发是使用jsp实现,这种开发技术具有java一样的很好的系统移植性。 

    (3) 对于数据精度方面,应在数据库中加以限制;实现实体完整性,用户自定义完整性约束。 

    (4) 在设计界面结构和数据结构是应留有对以后扩充系统功能的余地,如可以在每个数据字段上设计多个自定义字段。

    2系统设计

    2.1系统概要设计

    在需求明确、准备开始编码之前,要做概要设计。概要设计的主要任务是把需求分析得到的DFD转换为软件结构和数据结构。设计软件结构的具体任务是:将一个复杂系统按功能进行模块划分、建立模块的层次结构及调用关系、确定模块间的接口及人机界面等。数据结构设计包括数据特征的描述、确定数据的结构特性、以及数据库的设计。概要设计有多种方法。在早期有模块化方法、功能分解方法;在60年代后期提出了面向数据流和面向数据结构的设计方法;近年来又提出面向对象的设计方法等。本系统采用模块化软件设计,自顶向下逐层把软件系统划分成若干模块。每个模块完成一个特定的功能,最后将所有模块按照某种方法组合成一个整体,达到整个播放器所要求的功能。

    2.2 系统功能设计及描述

    成绩系统不仅要实现常见的录入成绩功能,而且还要有友好的用户界面。其最终设计目标是:多用户可以同时对系统进行操作、实现学生成绩录入,实现老师可以查看学生成绩情况运行平台要求不高、界面美观舒适、操作简单、易维护、高稳定性、,能满足用户的常见需求。

    主要划分为以下四个功能模块,每个功能模块的作用描述如下:

    • 成绩录入管理:录入学生成绩信息
    • 成绩修改管理:主要用来修改成绩信息
    • 成绩删除管理:教师可以对成绩信息进行管理。
    • 成绩查看管理:教师可以查看学生成绩信息
    • 班级录入管理教师可以提前录入所带班级情况

    其具体功能模块如图4-1所示:

     

    2-1 教师成绩录入系统功能模块图

    3系统功能的实现代码与截图。

    3.1录入系统主页

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>高校教师成绩录入系统</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

      </head>

      

        <frameset rows="80,*">

       <frame name="top" src="${pageContext.request.contextPath}/resource/frame/top.jsp">

       <frameset cols="150,*" id="main">

          <frame src="${pageContext.request.contextPath}/resource/frame/left.jsp"

          <frame name="right" src="${pageContext.request.contextPath}/resource/frame/right.jsp">

           </frameset>

        </frameset>

    </html>

    3.2查看班级信息

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

    <%@ taglib uri="/struts-tags" prefix="s" %>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>listDep</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

    <style type="text/css">

            .table1{

                border:1px solid #ddd;

                900px;    

            }

            thead{

                

            }

        </style>

      </head>

      

      <body>

        <table border="0" width="900px">

    <tr>

    <td align="center" style="font-size:24px; color:#666"> 班级管理</td>

    </tr>

    <tr>

    <td align="right" ><a href="${pageContext.request.contextPath}/department_saveUI.action">添加</a></td>

    </tr>

    </table>

    <table cellspacing="0" border="1" class="table1">

    <thead>

       <tr>

          <th width="100">班级名称</th>

          <th width="1050">介绍</th>

          <th width="100">编辑</th>

          <th width="100">删除</th>

       </tr>

    </thead>

    <tbody>

        <s:iterator value="list" var="d">

           <tr>

     <td align="center"><s:property value="#d.dname" /></td>

     <td align="center"><s:property value="#d.ddesc" /></td>

     <td align="center"><a href="${pageContext.request.contextPath}/department_edit.action?did=<s:property value="#d.did" />"><img src="${pageContext.request.contextPath}/resource/images/bianji.png"/></a></td>

     <td align="center"><a href="${pageContext.request.contextPath}/department_delete.action?did=<s:property value="#d.did" />"><img src="${pageContext.request.contextPath}/resource/images/trash.gif"/></a></td>

       </tr>

        </s:iterator>

    </tbody>

    </table>

        <br/>

        

        <table border="0" cellspacing="0" cellpadding="0"  width="900px">

    <tr>

    <td align="right">

       <span>第<s:property value="currPage" />/<s:property value="totalPage" />页</span>  

       <span>总记录数:<s:property value="totalCount" />  每页显示:<s:property value="pageSize" /></span>   

       

       <span>

       <s:if test="currPage != 1">

          <a href="${pageContext.request.contextPath}/department_findAll.action?currPage=1">[首页]</a>  

          <a href="${pageContext.request.contextPath}/department_findAll.action?currPage=<s:property value="currPage-1"/>">[上一页]</a>  

       </s:if>

       <s:if test="currPage != totalPage">

          <a href="${pageContext.request.contextPath}/department_findAll.action?currPage=<s:property value="currPage+1"/>">[下一页]</a>  

          <a href="${pageContext.request.contextPath}/department_findAll.action?currPage=<s:property value="totalPage" />">[尾页]</a>  

       </s:if>    

           

       </span>

    </td>

    </tr>

    </table>

      </body>

    </html>

    3.3编辑班级信息

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

    <%@ taglib uri="/struts-tags" prefix="s" %>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>addDepartment</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

      </head>

      

      <body>

        <table border="0" width="600px">

    <tr>

      <td align="center" style="font-size:24px; color:#666">班级信息修改</td>

    </tr>

    <tr>

      <td align="right" > 

        <a href="javascript:document.getElementById('saveForm').submit()">保存</a>   

        <a href="javascript:history.go(-1)">退回 </a>

      </td>

    </tr>

    </table>

    <br/>

    <s:form id="saveForm" action="department_update" method="post" namespace="/" theme="simple">

    <s:hidden name="did" value="%{model.did}">

       <table style="font-size::16px">

    <tr>

      <td>班级名称:</td>

      <td><s:textfield name="dname" value="%{model.dname}"/></td>

    </tr>

    <tr>

      <td>班级介绍:</td>

      <td></td>

    </tr>

    <tr>

      <td width="10%"></td>

      <td>

         <s:textarea rows="5" cols="50" name="ddesc" value="%{model.ddesc}" />

      </td>

    </tr>

       </table>

    </s:hidden>

    </s:form>

      </body>

    </html>

    3.4查看成绩信息

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %>

    <%@ taglib uri="/struts-tags" prefix="s" %>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>listEmployee</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

    <style type="text/css">

            .table1{

                border:1px solid #ddd;

                900px;   

            }

            thead{

                

            }

        </style>

      </head>

      

      <body>

        <table border="0" width="900px">

           <tr>

     <td align="center" style="font-size:24px; color:#666">成绩管理</td>

       </tr>

       <tr>

     <td align="right" ><a href="${pageContext.request.contextPath}/employee_saveUI.action">添加</a></td>

       </tr>

        </table>

        <br/>

        <table cellspacing="0" border="1" class="table1">

           <thead>

      <tr>

    <td align="center">编号</td>

    <td align="center">学生姓名</td>

    <td align="center">性别</td>

    <td align="center">考试成绩</td>

    <td align="center">考试时间</td>

    <td align="center">所在班级</td>

    <td align="center">编辑</td>

    <td align="center">删除</td>

     </tr>

      </thead>

      <tbody>

         <s:iterator value="list" var="e">

     <tr>

    <td align="center"><s:property value="#e.eno"/></td>

    <td align="center"><s:property value="#e.ename"/></td>

    <td align="center"><s:property value="#e.sex"/></td>

    <td align="center"><s:property value="#e.birthday"/></td>

    <td align="center"><s:date name="#e.joinDate"/></td>

    <td align="center"><s:property value="#e.department.dname"/></td>

    <td align="center"><a href="${pageContext.request.contextPath}/employee_edit.action?eid=<s:property value="#e.eid"/>"><img src="${pageContext.request.contextPath}/resource/images/bianji.png"/></a></td>

    <td align="center"><a href="${pageContext.request.contextPath}/employee_delete.action?eid=<s:property value="#e.eid"/>"><img src="${pageContext.request.contextPath}/resource/images/trash.gif"/></a></td>

     </tr>

     </s:iterator>

     </tbody>

        </table>

        <br/>

        <table border="0" cellspacing="0" cellpadding="0"  width="900px">

    <tr>

    <td align="right">

       <span>第<s:property value="currPage"/>/<s:property value="totalPage"/>页</span>  

       <span>总记录数:<s:property value="totalCount" />  每页显示:<s:property value="pageSize" /></span>   

       

       <span>

         <s:if test="currPage != 1">

           <a href="${pageContext.request.contextPath}/employee_findAll.action?currPage=1">[首页]</a>  

           <a href="${pageContext.request.contextPath}/employee_findAll.action?currPage=<s:property value="currPage-1"/>">[上一页]</a>  

         </s:if>

         <s:if test="currPage != totalPage">

           <a href="${pageContext.request.contextPath}/employee_findAll.action?currPage=<s:property value="currPage+1"/>">[下一页]</a>  

           <a href="${pageContext.request.contextPath}/employee_findAll.action?currPage=<s:property value="totalPage" />">[尾页]</a>  

         </s:if>

       </span>

    </td>

    </tr>

    </table>

      </body>

    </html>

    3.5录入成绩信息

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

    <%@ taglib uri="/struts-tags" prefix="s" %>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>addEmployee</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

    <script type="text/javascript" src="${pageContext.request.contextPath }/resource/js/My97DatePicker/WdatePicker.js"></script>

      </head>

      

      <body>

        <table border="0" width="600px">

    <tr>

      <td align="center" style="font-size:24px; color:#666">成绩录入</td>

    </tr>

    <tr>

      <td align="right" > 

        <a href="javascript:document.getElementById('saveForm').submit()">保存</a>   

        <a href="javascript:history.go(-1)">退回</a>

      </td>

    </tr>

    </table>

    <br/>

    <s:form id="saveForm" action="employee_save" method="post" namespace="/" theme="simple">

    <table border='0' cellpadding="0"  cellspacing="10">

    <tr>

    <td>姓名:</td>

    <td><s:textfield name="ename" /></td>

    <td>性别:</td>

    <td><s:radio name="sex" list="{'',''}" /></td>

    </tr>

    <%-- <tr>

    <td>用户名:</td>

    <td><s:textfield name="username" /></td>

    <td>密码:</td>

    <td><s:password name="password" /></td>

    </tr> --%>

    <tr>

    <td>考试成绩:</td>

    <td><input type="text" name="birthday"/></td>

    <td>考试时间:</td>

    <td><input type="text" name="joinDate" style=" 90%" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" /></td>

    </tr>

    <tr>

    <td>所在班级:</td>

    <td><s:select name="department.did" list="list" listKey="did" listValue="dname" headKey="" headerValue="--请选择--" /></td>

    <td>编号:</td>

    <td><s:textfield name="eno" /></td>

    </tr>

    </table>

    </s:form>

      </body>

    </html>

    3.4删除成绩

     

    3.5编辑成绩信息

     

    关键代码:

    <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

    <%@ taglib uri="/struts-tags" prefix="s" %>

    <%

    String path = request.getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

      <head>

        <base href="<%=basePath%>">

        

        <title>addDepartment</title>

        

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->

    <script type="text/javascript" src="${pageContext.request.contextPath }/resource/js/My97DatePicker/WdatePicker.js"></script>

      </head>

      

      <body>

        <table border="0" width="600px">

    <tr>

      <td align="center" style="font-size:24px; color:#666">成绩修改</td>

    </tr>

    <tr>

      <td align="right" > 

        <a href="javascript:document.getElementById('saveForm').submit()">保存</a>   

        <a href="javascript:history.go(-1)">退回 </a>

      </td>

    </tr>

    </table>

    <br/>

    <s:form id="saveForm" action="employee_update" method="post" namespace="/" theme="simple">

    <s:hidden name="eid" value="%{model.eid}">

       <table style="font-size::16px">

    <tr>

      <td>姓名:</td>

      <td><s:textfield name="ename" value="%{model.ename}"/></td>

      <td>性别:</td>

      <td><s:radio name="sex" list="{'',''}" value="%{model.sex}"/></td>

    </tr>

    <%-- <tr>

      <td>用户名:</td>

      <td><s:textfield name="username" value="%{model.username}"/></td>

      <td>密码:</td>

      <td><s:password name="password" value="%{model.password}" showPassword="true"/></td>

    </tr> --%>

    <tr>

      <td>考试成绩:</td>

      <td>

         <s:textfield name="birthday"  value="%{model.birthday}" />

      </td>   

      <td>考试时间:</td>

      <td>

         <input type="text" name="joinDate" style=" 90%" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<s:date name="model.joinDate" format="yyyy-MM-dd" />" />

      </td>

    </tr>

    <tr>

      <td>所属班级:</td>

      <td><s:select name="department.did" list="list" value="%{model.department.did}" listKey="did" listValue="dname" headerKey="" headerValue="---请选择---"/></td>

      <td>编号:</td>

      <td><s:textfield name="eno" value="%{model.eno}" /></td>

    </tr>

       </table>

    </s:hidden>

    </s:form>

      </body>

    </html>

    4心得体会

         通过此次大作业的完成,我对前几次的实验有了进一步的巩固,对struts2实现跳转,hibernate实现连接数据库,持久化,spring实现容器管理,实现控制反转和依赖注入的掌握进一步加深,通过在配置文件中写页面跳转,修改方便,可修改性强,实现了低耦合。此次大作业整体做出来的功能虽然简洁,但是实验过程中掌握了正确的学习方法,我认为这是更有意义的。

  • 相关阅读:
    Effective C++学习笔记之explicit
    腾讯面试经验2
    腾讯面试经验
    值类型和引用类型的区别,struct和class的区别
    【转载】固态硬盘的S.M.A.R.T详解
    SSD的传输总线、传输协议、传输接口
    坏块管理(Bad Block Management,BBM)
    脱离SVN的控制
    Func的介绍
    简单AOP
  • 原文地址:https://www.cnblogs.com/xiangyu721/p/14941532.html
Copyright © 2020-2023  润新知