论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 ASP JSP .NET VB6.0 JAVA VC VF DELPHI PB 计算机网络 计算机科学与技术 PHP 安卓APP 其他 代写论文

A450VB计算机自动出卷系统vb版

  2 .   需求分析

2.1 负责的功能模块 copyright paper51.com

n       设计试题生成功能,试题能分布整个教学内容

http://www.snowings.com

n       具有试题的答案生成功能 内容来自论文无忧网 www.snowings.com

n       数据库设计及维护

内容来自论文无忧网 www.snowings.com

n       程序的其它选项设置

http://www.snowings.com

2.2 软件功能分析

http://www.snowings.com

根据我负责的功能模块,主要是在试卷的生成上。

内容来自www.snowings.com

1.要显示书本章节信息以供用户使用。而在数据库里章节的存放是没有规则也即它们的顺序不一定按照真实书本的章节顺序来存储的。但是在显示章节信息的时候必须按照书本的章节顺序来显示。所以特别设置如下的数据类型: copyright paper51.com

Public Function AddQuestion(ByVal iCount As Long, ByVal QID AsLong, ByVal QType As QuestionType, ByVal Score As Single) As Boolean

内容来自www.snowings.com

    OnError Resume Next

内容来自www.snowings.com

   DataEnv.rsQstPaper.Open 内容来自www.snowings.com

   DataEnv.rsQstPaper.Filter = "QuestionID = " & CStr(QID)& " and QuestionType = " & CStr(QType) & " "

内容来自www.snowings.com

    IfDataEnv.rsQstPaper.RecordCount > 0 Then copyright paper51.com

       AddQuestion = False copyright paper51.com

    Else

http://www.snowings.com

       DataEnv.rsQstPaper.Filter = "" 内容来自论文无忧网 www.snowings.com

       DataEnv.rsQstPaper.AddNew

内容来自论文无忧网 www.snowings.com

       DataEnv.rsQstPaper.Fields("PaperSerial") = iCount paper51.com

       DataEnv.rsQstPaper.Fields("QuestionID") = QID copyright paper51.com

        DataEnv.rsQstPaper.Fields("QuestionType")= QType

copyright paper51.com

       

copyright paper51.com

       DataEnv.rsQstPaper.Fields("Score") = Score http://www.snowings.com

       http://www.snowings.com

       DataEnv.rsQstPaper.Update

内容来自论文无忧网 www.snowings.com

       AddQuestion = True

内容来自论文无忧网 www.snowings.com

    End If 内容来自论文无忧网 www.snowings.com

   DataEnv.rsQstPaper.Filter = ""

内容来自www.snowings.com

   DataEnv.rsQstPaper.Close http://www.snowings.com

End Function

内容来自www.snowings.com

2.手动生成试卷时要不断的将用户选择的题目临时存储起来,由于记录一道题所包含的信息不是很多,再因为这些信息一会儿还要在“保存答案”里使用,所以我设置了4个的全局变量,定义如下: http://www.snowings.com

Public Function AddQuestion(ByVal iCount As Long, ByVal QID AsLong, ByVal QType As QuestionType, ByVal Score As Single) As Boolean http://www.snowings.com

    OnError Resume Next

paper51.com

   DataEnv.rsQstPaper.Open

内容来自论文无忧网 www.snowings.com

   DataEnv.rsQstPaper.Filter = "QuestionID = " & CStr(QID)& " and QuestionType = " & CStr(QType) & " " 内容来自论文无忧网 www.snowings.com

    IfDataEnv.rsQstPaper.RecordCount > 0 Then

paper51.com

       AddQuestion = False paper51.com

    Else paper51.com

       DataEnv.rsQstPaper.Filter = ""

内容来自www.snowings.com

       DataEnv.rsQstPaper.AddNew copyright paper51.com

       DataEnv.rsQstPaper.Fields("PaperSerial") = iCount

内容来自论文无忧网 www.snowings.com

       DataEnv.rsQstPaper.Fields("QuestionID") = QID 内容来自论文无忧网 www.snowings.com

       DataEnv.rsQstPaper.Fields("QuestionType") = QType

paper51.com

       

内容来自www.snowings.com

       DataEnv.rsQstPaper.Fields("Score") = Score 内容来自www.snowings.com

      

http://www.snowings.com

       DataEnv.rsQstPaper.Update

内容来自www.snowings.com

       AddQuestion = True copyright paper51.com

    End If 内容来自论文无忧网 www.snowings.com

   DataEnv.rsQstPaper.Filter = ""

内容来自论文无忧网 www.snowings.com

   DataEnv.rsQstPaper.Close 内容来自论文无忧网 www.snowings.com

End Function http://www.snowings.com

  

copyright paper51.com

    3.在自动生成试卷里最主要的一点就是如何生成一个覆盖知道点广且试题不重复的试卷。其中的关键算法在于如何生成一个不重复的随机数序列。其中变量定义如下:

内容来自论文无忧网 www.snowings.com

  Public Function Create() As Boolean http://www.snowings.com

    On Error Resume Next

内容来自论文无忧网 www.snowings.com

    If Created Then http://www.snowings.com

       Create = False

http://www.snowings.com

        ExitFunction

内容来自www.snowings.com

    End If

内容来自论文无忧网 www.snowings.com

    DataEnv.DelQuestion 内容来自论文无忧网 www.snowings.com

    Dim iCount As Long copyright paper51.com

    Dim QID As Long

http://www.snowings.com

    Dim Score As Single

http://www.snowings.com

    paper51.com

    http://www.snowings.com

   

copyright paper51.com

    For iCount = 1 To FillingNum 内容来自www.snowings.com

       QID =GetQID(1, Score)

paper51.com

      AddQuestion iCount, QID, 1, Score paper51.com

    Next paper51.com

   

copyright paper51.com

    For iCount = 1 ToRightWrongNum

内容来自www.snowings.com

       QID =GetQID(2, Score)

内容来自论文无忧网 www.snowings.com

      AddQuestion iCount + FillingNum, QID, 2, Score copyright paper51.com

    Next

paper51.com

    For iCount = 1 To SingleSelNum

paper51.com

       QID =GetQID(3, Score) 内容来自www.snowings.com

      AddQuestion iCount + FillingNum + RightWrongNum, QID, 3, Score paper51.com

    Next

paper51.com

    For iCount = 1 ToMultiSelNum http://www.snowings.com

       QID =GetQID(4, Score)

内容来自论文无忧网 www.snowings.com

      AddQuestion iCount + FillingNum + RightWrongNum + SingleSelNum, QID, 4,Score

copyright paper51.com

    Next

paper51.com

    For iCount = 1 ToEssayQuesNum 内容来自论文无忧网 www.snowings.com

       QID =GetQID(5, Score) 内容来自www.snowings.com

      AddQuestion iCount + FillingNum + RightWrongNum + SingleSelNum +MultiSelNum, QID, 5, Score

内容来自www.snowings.com

    Next

copyright paper51.com

    Created = True http://www.snowings.com

    Create = True

内容来自www.snowings.com

End Function copyright paper51.com

------分隔线----------------------------
联系方式