首页 C语言题库管理系统设计—毕业设计论文

C语言题库管理系统设计—毕业设计论文

举报
开通vip

C语言题库管理系统设计—毕业设计论文C语言题库管理系统设计—毕业设计论文 题库管理系统 摘 要 汇编语言试题库管理系统是信息管理系统,其开发的功能主要包 括:通过计算机管理题库档案,过强大的查询和索检高效的索检出数 据,提高办事效率。 使用 MICROSOFT公司的 ACCESS作为后台数据 库,设计数据库, 使用 MICROSOFT公司的 VISUAL C++ 6.0开发工具, 利用其提供的各种面向对象的开发工具, 使用ADO控件连接数据库, 开发出产品。 关键字:题库管理系统,VISUAL C++ 6.0,数据库。 Abstract ...

C语言题库管理系统设计—毕业设计论文
C语言题库管理系统 设计 领导形象设计圆作业设计ao工艺污水处理厂设计附属工程施工组织设计清扫机器人结构设计 —毕业设计论文 题库管理系统 摘 要 汇编语言 试题 中考模拟试题doc幼小衔接 数学试题 下载云南高中历年会考数学试题下载N4真题下载党史题库下载 库管理系统是信息管理系统,其开发的功能主要包 括:通过计算机管理题库档案,过强大的查询和索检高效的索检出数 据,提高办事效率。 使用 MICROSOFT公司的 ACCESS作为后台数据 库,设计数据库, 使用 MICROSOFT公司的 VISUAL C++ 6.0开发工具, 利用其提供的各种面向对象的开发工具, 使用ADO控件连接数据库, 开发出产品。 关键字:题库管理系统,VISUAL C++ 6.0,数据库。 Abstract A database management system is the information management system, the function that it develop mainly includes:Pass a database of the calculator management file, lead the strong search and the checks efficiently of checking a data, raise to handle affairs the efficiency. The ACCESS that uses the company of MICROSOFT is the backstage database, the design database, use the VISUAL C++ 6.0 development tool of the company of MICROSOFT, make use of various development tool that faces to the object of what it provide, use the ADO to control a conjunction database, develop to produce the article. Keywords: Database management system ,VISUAL C++ 6.0, Database. 目 录 摘 要……………………………………………………………… …… 1 Abstract………………………………………………………………… … 1 目 录……………………………………………………………… ……… 2 一、前 言....................................................4 二、开发工具和相关知识简介 ...................................4 2.1 Vc++基础 ..............................................5 2.2 SQL语言简介 ...........................................5 三、编译原理试题库系统的需求分析 .............................6 3.1 系统的开发背景 .......................................6 3.2 系统的可行性研究 .....................................7 3.3 开发过程框图 .........................................7 3.4 系统功能分析 .........................................8 3.5 系统总体流程图 .......................................9 四、系统总体设计 ............................................10 4.1 系统功能模块框图 ....................................10 4.2 数据库设计 ..........................................11 4.2.1 数据库需求分析 .................................11 4.2.2 数据库结构设计 .................................12 五、编译原理试题库系统具体实现 ..............................14 5.1 系统登录 ............................................21 5.2 试题库系统主界面 ...................................24 5.3 试题管理对话框 ......................................29 5.3.1填空题管理 .......................................29 5.3.2选择题管理 .......................................37 5.4 用户管理对话框 .......................................47 5.5 成绩管理页面 .........................................55 5.6 考试页面 .............................................58 5.7 生成试卷对话框 .......................................76 六、软件测试.................................................81 结 束 语 81 致 谢 81 主要参考文献.................................................82 一、前 言 我们已经进入了一个信息化的时代,计算机在我们的生活中有着不可取代的地位。人们可以利用计算机进行各种活动,以减少人的大量的劳动。信息时代也带来了教学的改革,现在越来越多的学校使用电子教学手段,不仅可以减少大量的繁杂的劳动,而且可以大大提高教学质量。这种背景下,试题库管理系统被提到了,也就是试题的集成,试卷生成,和无纸考试。 该系统试题库管理是对提交到数据库中的,大量试题信息进行管理。管理员可以浏览到整个数据库中的试题信息,还可以按照所需的各种条件进行查询,同时具有对查询到的信息数目的统计功能,并可对这些试题进行修改和删除。另外,还可以对用户提交的试卷进行管理,可以查看成绩,可以删除。还能够添加用户,可以更改用户信息,删除信息。该系统界面直观,操作方便,具有很强的实用性。 本次设计的软件部分,涉及到的相关知识有:vc++6.0软件设计,odbc数据库连接机技术,以及SQL语言。 本论文共部分: 二、开发工具和相关知识简介 本系统主要是以vc++6.0为开发工具,Access2003作为数据库。 2.1 Vc++基础 Visual C++ 作为一种程序设计语言,它同时也是一个集成开发工具,提供了软件代码自动生成和可视化的资源编辑功能。在使用Visual C++开发应用程序的过程中,系统为我们生成了大量的各种类型的文件。 首先介绍,扩展名为.dsw的文件类型,这种文件在vc 中是级别最高的,称为workspace文件。在vc中,应用程序是以 project 的形式存在的,project文件的扩展名为.dsp ,在.dsw 文件中可以包含多个.dsp的文件,由workspace文件对他们统一的管理。 与dsw 类型的文件相配合的一个重要的文件是.opt文件,这个文件保存的是和workspace 中用到的有关本机的配置文件,所以不能在不同的计算机上共享。当我们打开一个workspace文件时,如果系统找不到需要的opt文件,就会自动的创建一个与之配合的,包含本地的计算机的信息的opt文件。 以clw为扩展名的文件,是用来存放应用程序中用到的类和资源的信息。这些信息是vc中的class wizard工具管理和使用类的信息来源。 对应每一个应用程序,有一个readme.txt文件,这个文件中列出了,应用程序中用到的,所有文件的信息,打开查看,就能对应用程序的结构有一个基本的认识。 在应用程序中大量应用的是以.h和.cpp为扩展名的文件,以.h的是叫头文件,.cpp的叫实现文件,一般来说,.h和.cpp文件是一一对应的,在.h的文件中是对应的类的定义,.cpp是主要的成员函数的实现代码。 在应用程序中经常要用到一些位图、菜单之类的资源。Vc中以.rc为扩展名的文件叫资源文件,其中包含应用程序中用到的所有资源。 2.2 SQL语言简介 SQL是Structed Query Language(结构化查询语言)的英文缩略语,也有人称之为Standart Query Language( 标准 excel标准偏差excel标准偏差函数exl标准差函数国标检验抽样标准表免费下载红头文件格式标准下载 化查询语言)。SQL语言已经成为国际标准语言。各数据库厂商纷纷推出各自支持SQL的软件以及SQL接口,它是关系数据库无可争议的主流语言。 SQL语言之所以被广泛接受和认可,是因为他是一个综合的,通用的,功能强大并且简单易学的语言。它集成了数据定义语言(Date Defintion Language,DDL),数据操纵语言(Date Manipulation Language,DML),数据控制语言(Date Control Language)于一身,具有强劲的数据查询(Date Query)功能。其语言风格统一,简洁凝练且独立完整,并且有良好的可扩充性。 SQL既可以独立使用,即独立地在计算机上与数据交互,也可以内含在其他高级语言(如 C,BASIC等)中统一编程使用。SQL的核心命令只有9个动词语句,其中属于数据定义的有3个:create,drop和alter。属于数据操纵的有3个:insert,update和delete。属于数据查询的有1个:select。属于数据控制的有2个:grant和revote。SQL语言不区分大小写,但对数据,表名和字段名最好统一。 三、编译原理试题库系统的需求分析 3.1 系统的开发背景 在当前的信息环境下,随着社会的进步和技术的发展,知识正在发挥着越来越大的作用。企业、机关、学校等各单位想在激烈的竞争环境中立于不败之地,就必须认识到提高竞争力,安徽工业大学也不例外。为了适应以后发展的要求,减轻教师的负担,让老师从繁重的出试卷、改试卷,及管理试卷的劳动中解放出来,让老师全身投入到教学工作中,从而提高教学质量和教学效率。 在这种环境下,提出了对试题库系统的需求。 3.2 系统的可行性研究 现在的硬件、软件,及数据库技术已经完全可以支持这样的一个系统的所有需求的实现。在这里,我们选用普通的pc机,编程工具使用vc++6.0,数据库由Access2003支持。完全可以满足用户的需求。 本系统开发的费用比较低,在交付使用之后,其实用性、方便性,会赢得广大教师的认同。所得的效益完全超过软件的开发费用,此后也就会带来相应的经济效益。 本系统具有美观、友好的人机交互界面,采用了问答式与多功能菜单相结合的用户参与方式,对各种输入信息进行提示和帮助。其中大部分的界面都是按照用户的要求定制的,用户操作简便易行。 3.3 开发过程框图 软件 计划 项目进度计划表范例计划下载计划下载计划下载课程教学计划下载 需求分析 复 审 软件设计 软件编码 软件试用 有错 软件维护 3.4 系统功能分析 本系统需要完成的功能主要有: , 教师登录、考生登录 , 用户管理(记录的新建、修改、删除和定位) , 题库管理与维护(记录的新建、修改、删除和定位) , 从题库中自动选择一定数量的试题(选择和填空题), 生成考盘(随机产生题 号, 使各考生的题目顺序不一样)作为本次考试的学生考试库 , 答题(选择和填空题),如果中途退出,可再次进入答题环境 , 答题结束退出时,系统可自动评分,评分后不能再进入答题环境,评分时还向 用 提供答题的相关信息:每类题的得分,出错的试题等 , 管理员身份可以查看用户的考试信息,得分等,能进行维护,可以删除用户 的 卷信息(已提交试卷) , 考试结束用户可以查询自己的考试成绩,包括以往的考试(已提交的成绩) 3.5 系统总体流程图 开始 用户登录 是否是管理 检查用户名员 和密码 管理员界面 一般用户界 面 生成试卷 是否已生成 用户管理 试卷 进行考试 试卷管理、添加用户 成绩管理 是否交卷 删除用户 查看删除成 绩和试卷 更新用户 试题管理 评分、改错 试题管理:试题管理:试题管理: 添加 修改 删除 是否退出 结束 四、系统总体设计 4.1 系统功能模块框图 试题库管理系统 系资用 统料户 安维应 全护用 模模模 块 块 块 用用试选填试考 户户卷择空卷试 登管管题题生模 陆理理管模成块 模模模理 块 模 块 块 块 块 添删更查新更删新更删生评 加除新看建改除建改除成分 新已已删试试试试试试新错 用有有除题 题 题 题 题 题 试题 户 用用试卷 查 户 户 卷 看 4.2 数据库设计 数据库在一个信息管理系统中占有非常重要的地位,数据库设计的好坏将直接对应用系统的效率以及实现的效果产生影响。合理的数据库设计可以提高数据存储的效率,保证数据的完整和一致。同时,合理的数据库结构也将有利于程序的实现。 设计数据库系统时应该首先充分了解用户各方面的需求,包括现有的以及将来可能增加的需求。 4.2.1 数据库需求分析 用户的需求具体体现在各种信息的提供、保存、更新和查询统计,这就要求数据库结构能充分满足各种信息的输出和输入。收集基本数据、数据结构以及数据处理的流程,组成一份详尽的数据字典,为后面的详细设计打下基础 。 针对本系统要求,设计如下的数据项和数据结构: , 用户信息表:包括的数据项有:用户ID,用户名,用户密码,用户权限。 , 课程章节信息表:包括的数据项有:章节ID,章节名。 , 填空题信息表:包括的字段有:填空题ID,填空题目,填空题答案,所 属章节,本题分值。 , 选择题信息表:包括字段:选择题ID,选择题题目,选择题选项A,选 择题选项B,选择题选项C,选择题选项D,选择题选项E,选择题选 项F,选择题答案,所属章节,分值。 , 试卷信息表:包括字段:试卷项ID,试卷名,试题号,试题类型,考生 ID,考生答案。 , 成绩信息表:字段:成绩编号(ID),考生ID,试卷名,考试成绩,交 卷标识。 4.2.2 数据库结构设计 试题库管理系统数据库中各个表格的设计结果如下面的几个表格所示。每个表格表示在数据库中的一个表。 1(用户信息表:user_stu 字段名 数据类型 字段大小 主键 stuid 文本 50 是 stuname 文本 8 否 stupwd 文本 20 否 user_admi 数字 长整型 否 表4.2.2.1 2(章节表:zhang_tab 字段名 数据类型 字段大小 主键 zhangid 数字 长整型 否 zhangname 文本 20 是 表4.2.2.2 3(填空题信息表:tiank_tab 字段名 数据类型 字段大小 主键 tiankid 自动编号 长整型 是 tiankbody 文本 255 否 tiankdaan 文本 100 否 zhangid 文本 20 否 tiankfen 数字 长整型 否 表4.2.2.3 4(选择题信息表:xuanz_tab 字段名 数据类型 字段大小 主键 Xuanzid 自动编号 长整型 是 Xuanzbody 文本 255 否 Xuanza 文本 50 否 Xuanzb 文本 50 否 Xuanzc 文本 50 否 Xuanzd 文本 50 否 Xuanze 文本 50 否 Xuanzf 文本 50 否 Zhangid 文本 20 否 Xuanzfen 数字 长整型 否 Xuanzdaan 文本 50 否 表4.2.2.4 5(试卷信息表:shij_tab 字段名 数据类型 字段大小 主键 Shijid 自动编号 长整型 是 Shitid 数字 长整型 否 Shijname 文本 100 否 Stuid 文本 50 否 Shitidaan 文本 255 否 Shititype 文本 50 否 表4.2.2.5 6(成绩信息表:chengj_tab 字段名 数据类型 字段大小 主键 Chengjid 自动编号 长整型 是 Stuid 文本 50 否 Shijname 文本 100 否 Shijfen 数字 长整型 否 Handup 文本 10 否 表4.2.2.6 五、编译原理试题库系统具体实现 本系统是用VC6.0生成的单文档结构的应用程序,首先由向导生成一个单文档的应用程序,然后在程序中添加相应的对话框和,在对话框上添加不同的控件来实现不同的功能,产生实现对应功能的外观界面。 VC++6.0是面向对象的程序设计语言,每一个功能可以做为一个对象来看待,把特定的功能放在一个对象里实现,有助于简化系统设计。还可以使系统更安全和便于实现。这里,我就把系统的各个功能放到了不同的类里面去实现,还要完成与用户的交互,所以把功能模块用对话框类的派生类来实现,具体由对话框来完成交互,类里的成员函数来完成后台的数据处理。 为了与数据库交换数据,要用到MFC数据库访问类,本程序是使用的ODBC来连接数据库。数据库访问是封装的MFC数据库访问类,设顶数据源和本系统用到的封装类如下: 在Access2003中,按照上节数据库的设计表,建立数据库,命名为shitiku.mdb。然后打开本机的控制面板,管理工具,数据源(ODBC),如下图: 注册好ODBC数据源后,就可以在程序中使用ODBC连接数据库,可以动态的 更新查询数据库。 运行VC++6.0新建工程,命名为TESTING,在第一步选择单文档,其他保持 默认值。这样就生成了一个工程,用于本系统的建立。 在程序中使用了MFC的数据库类进行了封装,以用于本系统的统一数据库的 操作,具体实现代码如下: 文件1 //generaldef.h #ifndef GEN_DEFINE_H #define GEN_DEFINE_H #include "OdbcDB.h" extern COdbcDB g_odbcDB; extern CString Userid; extern BOOL HavEx; #endif 文件2 //GeneralDef.cpp #include "stdafx.h" #include "GeneralDef.h" COdbcDB g_odbcDB; CString Userid; BOOL HavEx; 文件3 //OdbcDB.h #ifndef ODBC_DB_H #define ODBC_DB_H #include #include //利用vector数组结构构造一维字符串数组 typedef ::std::vector CStrs; //利用vector数组结构构造二维字符串数组 typedef ::std::vector CDStrs; class COdbcDB { public: COdbcDB(); virtual ~COdbcDB(); public: 数据库连接 // HRESULT Connect(CString strDBSource,CString strDBUser,CString strDBPwd); //数据库关闭 void DisConnect(); //判断数据库是否处于打开状态 BOOL IsOpen(); //执行SQL语句 HRESULT ExecuteSQL(LPCSTR lpszSQL); //根据SQL语句查询数据库,获取的记录集保存在二维字符串数组中 void ExecuteQuery(LPCTSTR lpszSQL,CDStrs& Fields); //根据SQL语句查询数据库,获取一个字段值 void ExecuteQueryValue(LPCTSTR lpszSQL,CString& value); protected: //数据库对象 CDatabase m_db; BOOL m_IsDBOpen; //数据库是否打开 CString m_strDBSource; //数据库源 CString m_strDBUser; //数据库用户名 CString m_strDBPwd; //数据库用户密码 }; #endif 文件4 //OdbcDB.cpp #include "stdafx.h" #include "odbcDB.h" #define DB_NOT_OPEN 0x2001 //数据库打开错误 #define DB_NO_RECORD 0x2002 //没有数据 #define DB_SAVE_EPG_ERR 0x2003 //保存Epg失败 #define DB_SET_BIGBLOK_ERR 0x2004 //设置大数据错误 #define DB_NOT_NORMAL 0x2005 //数据库打开错误 #define MEMORY_EXCEPTION 0x2006 //Memory 异常 #define MS_OTHER_EXCEPTION 0x2007 //其他异常 COdbcDB::COdbcDB() { m_strDBSource = _T(""); m_strDBUser = _T(""); m_strDBPwd = _T(""); m_IsDBOpen = FALSE; } COdbcDB::~COdbcDB() { } BOOL COdbcDB::IsOpen() { return m_IsDBOpen; } HRESULT COdbcDB::ExecuteSQL(LPCSTR lpszSQL) { ASSERT(lpszSQL); TRY { //执行SQL语句 m_db.ExecuteSQL(lpszSQL); }//异常处理 CATCH(CDBException, pEx) { return pEx->m_nRetCode; } AND_CATCH(CException,pEx) { return MS_OTHER_EXCEPTION; } END_CATCH return S_OK; } HRESULT COdbcDB::Connect(CString strDBSource,CString strDBUser,CString strDBPwd) { //Init DB param,in case reconnect m_IsDBOpen = FALSE; m_db.Close(); m_strDBSource = strDBSource; m_strDBUser = strDBUser; m_strDBPwd = strDBPwd; //构造连接字符串 CString strDBOpen = _T(""); strDBOpen.Format("DSN=%s;UID=%s;PWD=%s",strDBSource,strDBUser,strDBPwd); TRY{ // 连接数据库 m_db.OpenEx(strDBOpen,CDatabase::noOdbcDialog); }//异常处理 CATCH(CDBException,ex) { m_IsDBOpen = FALSE; return DB_NOT_OPEN; } AND_CATCH(CMemoryException,pEx) { pEx->ReportError(); m_IsDBOpen = FALSE; return MEMORY_EXCEPTION; } AND_CATCH(CException,e) { m_IsDBOpen = FALSE; return MS_OTHER_EXCEPTION; } END_CATCH m_IsDBOpen = TRUE; return S_OK; } void COdbcDB::DisConnect() { m_IsDBOpen = FALSE; m_db.Close(); } void COdbcDB::ExecuteQueryValue(LPCTSTR lpszSQL,CString& value) { if(!m_db.IsOpen()){ return; } TRY{ CRecordset rs(&m_db); //打开记录集. rs.Open(CRecordset::dynaset, lpszSQL); if (!rs.IsEOF()) { rs.GetFieldValue((short)0, value); } rs.Close(); }//异常处理 CATCH(CDBException,ex) { AfxMessageBox (ex->m_strError); AfxMessageBox (ex->m_strStateNativeOrigin); } AND_CATCH(CMemoryException,pEx) { pEx->ReportError(); AfxMessageBox ("memory exception"); } AND_CATCH(CException,e) { TCHAR szError[100]; e->GetErrorMessage(szError,100); AfxMessageBox (szError); } END_CATCH } void COdbcDB::ExecuteQuery(LPCTSTR lpszSQL,CDStrs& Fields) { if(!m_db.IsOpen()){ return; } TRY{ CRecordset rs(&m_db); //打开所有的信息记录. rs.Open(CRecordset::dynaset, lpszSQL); while (!rs.IsEOF()) { CStrs strs; CString temp; //获取一条记录中的所有字段值保存到字符串数组strs中 for(short i = 0 ; i < rs.m_nResultCols ; i++){ rs.GetFieldValue((short)i, temp); strs.push_back(temp); } //保存一条记录到二维字符串数组中 Fields.push_back(strs); //转到下一条纪录 rs.MoveNext(); } rs.Close(); }//异常处理 CATCH(CDBException,ex) { AfxMessageBox (ex->m_strError); AfxMessageBox (ex->m_strStateNativeOrigin); } AND_CATCH(CMemoryException,pEx) { pEx->ReportError(); AfxMessageBox ("memory exception"); } AND_CATCH(CException,e) { TCHAR szError[100]; e->GetErrorMessage(szError,100); AfxMessageBox (szError); } END_CATCH } 以上是用于数据库操作的封装类,只要在本系统的工程中引入上面四个文件 generaldef.h ,GeneralDef.cpp ,OdbcDB.h ,OdbcDB.cpp ,然后在系统的stdafx.h 文件中加上#include "GeneralDef.h"就可以在本工程中的所有类中使用对象g_odbcDB进行数据库操作了。 5.1 系统登录 系统登录,是系统安全的关口,可以限制没有操作权限的用户对系统的重要信息的更改,所以在登录窗口中要对用户的合法性进行检查,还要对用户的权限进行确定。 所以要在用户输入用户名和密码后,查询数据库来确认用户合法性,和赋予用户对应的权限,关于用户的权限和用户信息都放在表:user_stu: 字段名 数据类型 字段大小 主键 stuid 文本 50 是 stuname 文本 8 否 stupwd 文本 20 否 user_admi 数字 长整型 否 用户登录界面要简洁明了,其中的图片是要从外部引入,效果如下: 对应的对话框要接受用户名和密码,然后查询数据库表,来进行确认,并读取user_admi字段来设定用户的权限。如果,没有通过确认,则提示用户:用户名或密码有错。本对话框为了更容易操作,在登录对话框的初始化中把用户表中的用户名读取出来,放到用户名栏(接受用户名的控件是一个可以下拉的组合框);对应对话框的的控件绑定的变量如下: 给对话框的 登录 按钮添加消息响应函数:OnOk();为对话框添加初始化函数: OnInitDialog(); 实现代码如下: BOOL CLoginDlg::OnInitDialog() { CDialog::OnInitDialog(); CDStrs m_name; CString strSQL; UpdateData(TRUE); //strSQL.Format("select * from password where user='%s' AND passwd='%s'",m_strUser,m_strPass); strSQL="select stuid from user_stu"; g_odbcDB.ExecuteQuery(strSQL,m_name); for(int i=0;im_bIsAdmin = FALSE; else ptheApp->m_bIsAdmin = TRUE; Userid=m_strUser; CStrs strs; CDStrs strShijName; strSQL.Format("select shijname from chengj_tab where stuid='%s' and handup='no' ",Userid); g_odbcDB.ExecuteQuery(strSQL,strShijName); if(strShijName.size()!=0) { HavEx=TRUE; } else { HavEx=FALSE; } CDialog::OnOK(); } } 5.2 试题库系统主界面 用户登录后,要出现一个主界面,用户的所有操作都在这里实现。主界面包括了菜单的设计,和工具栏的设计: 菜单如下: 在菜单的设计中,给每一个菜单设定一个不同的ID,但是工具栏的设计中要用到菜单的ID,对应特定的菜单的工具按钮,是为了实现菜单功能的一个快捷途径。所以工具栏按钮的ID都对应一个菜单项。 工具栏设计: 要使用数据库中的表中的信息,要在程序运行前的初始化中连接数据库,所以要在主程序的初始化函数BOOL CTestingApp::InitInstance()中添加如下语句: CString a,b,c; a="shitiku"; g_odbcDB.Connect(a,b,c); AfxEnableControlContainer(); 要控制系统安全,必须使登录界面早于主界面运行,所以要在主程序初始化函数中上面的语句后添加如下代码: CLoginDlg loginDlg; if(loginDlg.DoModal()!=IDOK) { return FALSE; } 并且在主程序的CTstingApp.cpp文件开始处添加#include "LoginDlg.h",声明对CLoginDlg的对象的使用。 要处理用户对菜单和工具条按钮的操作信息,要在主框架类CMainFrame的CPP文件中添加对应按钮和菜单的COMMAND消息响应函数:并且要在主程序中添加一个变量BOOL m_bIsAdmin用来标识管理员用户,在非管理员和管理员不能同时使用的功能,要给对应的菜单添加UPDATE_COMMACD_UI类型的消息响应函数,并且在菜单的pCmdUI->Enable();函数中用主函数CTstingApp中的变量m_bIsAdmin作为pCmdUI->Enable();的参数,就能限制非管理员用户使用对应的菜单。 关于添加菜单响应函数,如下图: 函数具体实现如下: void CMainFrame::OnSysQuit() { // TODO: Add your command handler code here if(AfxMessageBox("您确定要退出系统 吗?",MB_OKCANCEL)==IDCANCEL) { return; } CFrameWnd::OnClose(); } void CMainFrame::OnSysReload() { // TODO: Add your command handler code here CLoginDlg Dlg; Dlg.DoModal(); } void CMainFrame::OnSysUser() { // TODO: Add your command handler code here CUserDlg UserDlg; UserDlg.DoModal(); } void CMainFrame::OnUpdateSysUser(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here CTestingApp* ptheApp = (CTestingApp *) AfxGetApp(); pCmdUI->Enable(ptheApp->m_bIsAdmin); } void CMainFrame::OnSysTmanag() { // TODO: Add your command handler code here CTmanagDlg TmanagDlg; TmanagDlg.DoModal(); } void CMainFrame::OnClose() { // TODO: Add your message handler code here and/or call default if(AfxMessageBox("您确定要退出系统 吗?",MB_OKCANCEL)==IDCANCEL) { return; } CFrameWnd::OnClose(); } void CMainFrame::OnUpdateSysTmanag(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here CTestingApp* ptheApp = (CTestingApp *) AfxGetApp(); pCmdUI->Enable(ptheApp->m_bIsAdmin); } void CMainFrame::OnSysBmanag() { // TODO: Add your command handler code here CBManagDlg BmanagDlg; BmanagDlg.DoModal(); } void CMainFrame::OnUpdateSysBmanag(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here CTestingApp* ptheApp = (CTestingApp *) AfxGetApp(); pCmdUI->Enable(ptheApp->m_bIsAdmin); } void CMainFrame::OnSysChoose() { // TODO: Add your command handler code here CChooseDlg ChooseDlg; ChooseDlg.DoModal(); } void CMainFrame::OnSysExam() { // TODO: Add your command handler code here CExamDlg ExamDlg; ExamDlg.DoModal(); } void CMainFrame::OnUpdateSysChoose(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here pCmdUI->Enable(!HavEx); } void CMainFrame::OnUpdateSysExam(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here pCmdUI->Enable(HavEx); } void CMainFrame::OnSysChengj() { // TODO: Add your command handler code here CChengJM ChengjDlg; ChengjDlg.DoModal(); } void CMainFrame::OnUpdateSysChengj(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here CTestingApp* ptheApp = (CTestingApp *) AfxGetApp(); pCmdUI->Enable(ptheApp->m_bIsAdmin); } 主框架类的包含文件如下:(需要手动输入,放在MainFrm.cpp文件开始处) #include "ChooseDlg.h" #include "BManagDlg.h" #include "LoginDlg.h" #include "UserDlg.h" #include "TmanagDlg.h" #include "ExamDlg.h" #include "chengjm.h" 5.3 试题管理对话框 在这两个对话框中可以进行试题的添加、修改、删除操作,另外还有查询试题功能,可以很方便用户的试题管理。 用户在进行试题管理,还要能动态看到更改的结果,要在对话框的内部给出操作代码,只有这样才能给用户一个尽量友好的界面。 在进行数据库操作时要小心数据库字段名的拼写;还要注意,用于数据库操作的SQL语句的格式,在VC++6.0中SQL语句的格式化中,字符串要用单引号,还有条件格式也不尽相同。 试题管理模块,是管理员用户对试题进行维护的一个模块,可提供试题的添加、删除、修改。这里也要用数据库管理类,本程序的公有变量g_odbcDB的成员函数可以提供对数据库表的添加、删除、修改操作。这里要给对话框上的控件添加变量。选择和填空不完全一样,下面分别说明: 5.3.1填空题管理 对话框界面效果如下图: 给控件绑定变量,如下图所示: 给控件绑定变量要注意变量的类型,不要搞错了,在绑定好类型后只要用对话框类的UPDATEDATA();函数就可以把控件的值传给对应的变量,UPDATEDATA(FALSE); 就可以把变量的值传给控件。这就是与用户交互的手段之一,然后就可以由得到的信息对数据库进行操作了。 为了能按用户的操作完成响应的功能,要在对话框中来完成,给新建、修改、删除添加处理函数。还要给对话框添加初始化函数来完成一些必须的初始化工作: 用来响应用户的操作,完成添加删除等功能。具体的函数代码如下: void CBManagDlg::OnButtonCl() { // TODO: Add your control notification handler code here m_strBBody= ""; m_strBAnswer =""; m_intFen=0; m_strZhangid=""; m_strUser=""; UpdateData(FALSE); } void CBManagDlg::OnButtonDelet() { // TODO: Add your control notification handler code here CString outprint; UpdateData(TRUE); int i = m_ListBid.GetSelectionMark(); m_strUser = m_ListBid.GetItemText(i,0); //判断是否指定用户 if(m_strUser=="") { MessageBox("请选择一个试题~"); return; } outprint.Format("您确定要删除 %s 试题 %s ???",m_strZhangid,m_strUser); if(AfxMessageBox(outprint,MB_OKCANCEL)==IDCANCEL) { return; } CString strSQL; strSQL.Format("delete from tiank_tab where tiankid=%d",atoi(m_strUser)); //删除该用户 g_odbcDB.ExecuteSQL(strSQL); //刷新用户列表 RefreshData(); m_strBBody= ""; m_strBAnswer= ""; m_intFen=0; UpdateData(FALSE); } void CBManagDlg::OnButtonUpdate() { // TODO: Add your control notification handler code here UpdateData(TRUE); CString strSQL; if(m_strUser=="") { MessageBox("请选择一个试题~"); return; } if(m_intFen<1||m_intFen>10) { MessageBox("请设置合适的试题分值(1~10)~~"); return; } if(m_strBBody=="") { MessageBox("请填写试题内容~~"); m_ctrBBody.SetFocus(); return; } if(m_strBAnswer=="") { MessageBox("请填写试题内容~~"); m_ctrBAnswer.SetFocus(); return; } if(m_strZhangid=="全部试题") { MessageBox("请选择试题所在章节~~"); return; } CString outprint; outprint.Format("您确定要修改 %s 试题 %s ???",m_strZhangid,m_strUser); if(AfxMessageBox(outprint,MB_OKCANCEL)==IDCANCEL) { return; } strSQL.Format("update tiank_tab set tiankbody='%s',tiankdaan='%s'" ",zhangid='%s',tiankfen=%d where tiankid=%d" ,m_strBBody,m_strBAnswer, m_strZhangid,m_intFen,atoi(m_strUser)); TRACE(strSQL); g_odbcDB.ExecuteSQL(strSQL); RefreshData(); } void CBManagDlg::OnSelchangeComboB() { // TODO: Add your control notification handler code here UpdateData(); RefreshData(); } void CBManagDlg::OnClickListBid(NMHDR* pNMHDR, LRESULT* pResult) { // TODO: Add your control notification handler code here CDStrs user_tab; CString strSQL; UpdateData(TRUE); //从数据库中获取选择用户名的资料 int i = m_ListBid.GetSelectionMark(); m_strUser = m_ListBid.GetItemText(i,0); if(m_strUser!="") { strSQL.Format("select * from tiank_tab where tiankid=%d",atoi(m_strUser)); g_odbcDB.ExecuteQuery(strSQL,user_tab); //显示用户资料 if(user_tab.size==0) { return; } CStrs strs=user_tab[0]; m_strBBody= strs[1]; m_strBAnswer = strs[2]; m_strZhangid = strs[3]; m_intFen=atoi(strs[4]); } UpdateData(FALSE); *pResult = 0; } void CBManagDlg::OnOK() { // TODO: Add extra validation here UpdateData(); if(m_strBBody==""||m_strBAnswer=="") { MessageBox("请填写试题内容和答案~~"); m_ctrBBody.SetFocus(); return; } if(m_strZhangid=="全部试题") { MessageBox("请选择试题所在章节~~"); return; } if(m_intFen<1||m_intFen>10) { MessageBox("请设置合适的试题分值(1~10)~~"); return; } if(AfxMessageBox("您确定要添加试题?",MB_OKCANCEL)==IDCANCEL) { return; } CString strSQL; strSQL.Format("Insert into tiank_tab (tiankbody,tiankdaan" ",zhangid,tiankfen)" "values (" "'%s','%s','%s',%d)", m_strBBody,m_strBAnswer,m_strZhangid,m_intFen); TRACE(strSQL); g_odbcDB.ExecuteSQL(strSQL); RefreshData(); } BOOL CBManagDlg::OnInitDialog() { CDialog::OnInitDialog(); m_strZhangid="全部试题"; m_ListBid.InsertColumn(0,"填空题号"); m_ListBid.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLI NES); m_ListBid.SetColumnWidth(0,120); CDStrs stuid; CString strSQL; //打开记录集 strSQL.Format("select zhangid,zhangname from zhang_tab order by zhangid "); g_odbcDB.ExecuteQuery(strSQL,stuid); m_ctrZhangid.InsertString(0,m_strZhangid); for(int i=0;i10) { MessageBox("请设置合适的试题分值(1~10)~~"); return; } if(m_strXBody=="") { MessageBox("请填写试题内容~~"); m_ctrXBody.SetFocus(); return; } if(m_strZhangid=="全部试题") { MessageBox("请选择试题所在章节~~"); return; } CString outprint; outprint.Format("您确定要修改为 %s 试题 %s ???",m_strZhangid,m_strUser); if(AfxMessageBox(outprint,MB_OKCANCEL)==IDCANCEL) { return; } IntToChar(); strSQL.Format("update xuanz_tab set xuanzbody='%s',xuanza='%s',xuanzb='%s',xuanzc='%s'" ",xuanzd='%s',xuanze='%s',xuanzf='%s',zhangid='%s',xuanzfen=%d,xuanzdaan=' %s'" "where xuanzid=%d", m_strXBody,m_strAnsA,m_strAnsB,m_strAnsC,m_strAnsD,m_strAnsE,m_strA nsF, m_strZhangid,m_intFen,m_strAnswer,atoi(m_strUser)); TRACE(strSQL); g_odbcDB.ExecuteSQL(strSQL); RefreshData(); } void CTmanagDlg::OnOK() { // TODO: Add extra validation here UpdateData(); if(m_strXBody=="") { MessageBox("请填写试题内容~~"); m_ctrXBody.SetFocus(); return; } if(m_strZhangid=="全部试题") { MessageBox("请选择试题所在章节~~"); return; } if(m_Answer<0||m_Answer>5) { MessageBox("请选择试题正确答案~~"); return; } if(m_intFen<1||m_intFen>10) { MessageBox("请设置合适的试题分值(1~10)~~"); return; } if(AfxMessageBox("您确定要添加试题?",MB_OKCANCEL)==IDCANCEL) { return; } IntToChar(); CString strSQL; strSQL.Format("Insert into xuanz_tab (xuanzbody,xuanza,xuanzb,xuanzc" ",xuanzd,xuanze,xuanzf,zhangid,xuanzfen,xuanzdaan)" "values (" "'%s','%s','%s','%s','%s','%s','%s','%s',%d,'%s')", m_strXBody,m_strAnsA,m_strAnsB,m_strAnsC,m_strAnsD,m_strAnsE,m_strA nsF, m_strZhangid,m_intFen,m_strAnswer); TRACE(strSQL); g_odbcDB.ExecuteSQL(strSQL); RefreshData(); } void CTmanagDlg::CharToInt() { if(m_strAnswer=="a") { m_Answer=0; return; } if(m_strAnswer=="b") { m_Answer=1; return; } if(m_strAnswer=="c") { m_Answer=2; return; } if(m_strAnswer=="d") { m_Answer=3; return; } if(m_strAnswer=="e") { m_Answer=4; return; } if(m_strAnswer=="f") { m_Answer=5; return; } } void CTmanagDlg::IntToChar() { if(m_Answer==0) { m_strAnswer="a"; return; } if(m_Answer==1) { m_strAnswer="b"; return; } if(m_Answer==2) { m_strAnswer="c"; return; } if(m_Answer==3) { m_strAnswer="d"; return; } if(m_Answer==4) { m_strAnswer="e"; return; } if(m_Answer==5) { m_strAnswer="f"; return; } } void CTmanagDlg::OnSelchangeCombo() { // TODO: Add your control notification handler code here UpdateData(); RefreshData(); } 5.4 用户管理对话框 用户管理,对现有的用户更新或删除,还有,新建用户,所有这些操作都要管理员才可以实现,非管理远没有这个权限。在对现有的用户管理的时候,有可能要给一些用户重新分配权限,这里要注意,管理员可以更改用户的管理员属性,所以有可能把自己的也改了,那就出问题了,所以要在本工程中定义一个全局变量用于保存本次用户的信息。所以在generaldef.h文件中加上extern CString Userid; 用于保存登录用户信息。 该界面主要用于管理用户,只有管理员用户,或有管理员权限的可以使用,该界面的控件如图所示: 要实现用户管理的功能,要添加对应的函数来处理,以下是对应的处理函数。下图是变量绑定: 定义消息响应函数: 实现代码: BOOL CUserDlg::OnInitDialog() { // TODO: Add extra initialization here CDialog::OnInitDialog(); //创建用户列表 m_ctrList.InsertColumn(0,"用户名"); m_ctrList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES) ; m_ctrList.SetColumnWidth(0,120); //在添加用户列表中添加用户名 RefreshData(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CUserDlg::RefreshData() { m_ctrList.SetFocus(); //清空用户列表 m_ctrList.DeleteAllItems(); m_ctrList.SetRedraw(FALSE); CDStrs stuid; CString strSQL; UpdateData(TRUE); //打开记录集 strSQL="select stuid from user_stu"; g_odbcDB.ExecuteQuery(strSQL,stuid); for(int i=0;i0) m_point--; if(m_point==0) m_ctrP.EnableWindow(FALSE); RefreshData(); } void CTiankDlg::OnCancel() { // TODO: Add extra cleanup here if(m_point==0) m_ctrP.EnableWindow(TRUE); if(m_point0) m_point--; if(m_point==0) m_ctrP.EnableWindow(FALSE); RefreshData(); } BOOL CXuanz::OnInitDialog() { CDialog::OnInitDialog(); CString strSQL; CStrs strs; CDStrs strShijName; //检查试卷是否存在 strSQL.Format("select shijname from chengj_tab where stuid='%s' and handup='no' ",Userid); g_odbcDB.ExecuteQuery(strSQL,strShijName); if(strShijName.size()!=0) { strs=strShijName[0]; //读取试卷的题目号 strSQL.Format("select shitid from shij_tab where stuid='%s' " "and shijname='%s' and shititype='xuanz'" "order by shitid" ,Userid,strs[0]); g_odbcDB.ExecuteQuery(strSQL,m_Tid); m_shijname=strs[0]; } m_ctrTid.InsertColumn(0,"选择题号"); m_ctrTid.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINE S); m_ctrTid.SetColumnWidth(0,120); if(m_Tid.size()!=0) { for(int i=0;i shitidaan" ,strs[0],Userid); g_odbcDB.ExecuteQuery(strSQL,m_CDT); //查询选择错题 strSQL.Format("select xuanzbody,xuanza,xuanzb,xuanzc,xuanzd,xuanze,xuanzf" ",shitidaan,xuanzdaan" " from xuanz_tab,shij_tab" " where shijname='%s' and shititype='xuanz' and stuid='%s' " "and shitid=xuanzid and xuanzdaan <> shitidaan" ,strs[0],Userid); g_odbcDB.ExecuteQuery(strSQL,m_CDX); m_intpointT=1; m_intpointX=1; m_intcountT=m_CDT.size(); m_intcountX=m_CDX.size(); if(m_intcountT!=0) { RefreshT(); } else { m_ctrB2.EnableWindow(FALSE); } if(m_intcountX!=0) { RefreshX(); } else { m_ctrB4.EnableWindow(FALSE); } m_ctrB1.EnableWindow(FALSE); m_ctrB3.EnableWindow(FALSE); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CCountDlg::OnButton1() { // TODO: Add your control notification handler code here if(m_intpointX==m_intcountX) m_ctrB2.EnableWindow(TRUE); if(m_intpointX>1) m_intpointX--; if(m_intpointX==1) m_ctrB1.EnableWindow(FALSE); RefreshX(); } void CCountDlg::OnButton2() { // TODO: Add your control notification handler code here if(m_intpointX==1) m_ctrB1.EnableWindow(TRUE); if(m_intpointX1) m_intpointT--; if(m_intpointT==1) m_ctrB3.EnableWindow(FALSE); RefreshT(); } void CCountDlg::OnButton4() { // TODO: Add your control notification handler code here if(m_intpointT==1) m_ctrB3.EnableWindow(TRUE); if(m_intpointT>16)%n; } int CChooseDlg::compare(unsigned short & s, int i, int k, unsigned short * r) { s=random(count,k); for(int j=0;j<=i;j++) { if(s==r[j]) { k++; compare(s,i,k,r); } } return 1; } BOOL CChooseDlg::OnInitDialog() { CDialog::OnInitDialog(); m_ctrList.InsertColumn(0,"试卷名"); m_ctrList.InsertColumn(1,"成绩"); m_ctrList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLIN ES); m_ctrList.SetColumnWidth(0,180); m_ctrList.SetColumnWidth(1,60); // TODO: Add extra initialization here CString strSQL; CStrs strs; CDStrs strShijName; strSQL.Format("select shijname,shijfen from chengj_tab where stuid='%s'",Userid); g_odbcDB.ExecuteQuery(strSQL,strShijName); if(strShijName.size()!=0) { for(int i=0;i 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 实际可能发现迄今为止尚未发现的错误的测试方案。成功的测试是发现了至今为止尚未发现的错误的测试。 该软件经过了先期的模块测试和后期的综合测试,一切正常,达到了预期的要求。 结 束 语 毕业设计已临近尾声,四年的大学生活也即将结束。通过本系统的设计,主要有以下体会: 一、培养了自己的动手能力。以前的学习,注重的是课本知识,很少动手编一些程序或设计一些小软件。通过此次毕业设计,很好地锻炼了我的动手能力。 二、加深了对课本知识的理解。本次设计,使我对书中的编程思想有了更深一步的认识,对软件工程的各个步骤的设计和内容有了更深的体会。 三、加强了实践能力的培养。通过分析和解决设计过程中出现的问题,培养了实际分析问题和解决问题的能力。 四、增强了自信心。四年的大学生活,基本上都是学习理论知识,没能有过多的时间去学习开发工具,没能从真正意义上理解计算机软件设计的含义。本次毕业设计,虽然设计得不尽完善,但毕竟是亲手所做,给自己在自信心上极大的鼓舞。 本次毕业设计,我学到的不仅仅是方法,更重要的是学会了怎样去发现问题、分析问题和解决问题。这将使我终身受益。 致 谢 本次毕业设计是我第一次独立开发一套比较完整的软件程序。在开发过程中,xxx老师给了我悉心的指导,让我对面向对象软件设计有了一个较深的认识。在设计的过程中,针对课题,我将四年所学的基础知识和专业知识有机地结合起来,并且在实践中加以应用。xxx老师认真负责地督促我进行设计工作,严格地 按照设计进程完成每一步计划内容。程序的设计过程并非一帆风顺,每次出现这样或那样问题时,xxx都会尽力帮助我,使我的设计进程不被打断。在此,我向杨老师表示由衷地感谢,感谢他在我整个毕业设计过程中给予我的鼓励以及理论知识和实践应用上的许多帮助。 同时,我们学院的计算中心和其他指导老师也给予了我大力的支持,还有同组同学和同班同学的热心帮助,在此,一并表示衷心地感谢。 主要参考文献 [1]邓文渊,陈惠贞,陈俊荣.ASP与网页数据库设计[M].大连:中国铁道出版社,2001,2 [2]肖志刚,张维.ASP动态网页设计应用培训教程[M].西安:电子工业出版社,2004,1 [3]张海藩.软件工程导论(第三版)[M].北京:清华大学出版社,1998,1 [4]萨师煊,王珊.数据库系统概论[M].北京:高等教育出,2002,5 [5]高志鹏,陈起.企业网站建设基础与实例[M].西安:电子工业出版社,2001,1 [6]北京博彦科技发展有限责任公司. Microsoft Access开发教程[M].北京:清华大学出版社.2001,2 [7]Gordon McComb.Web Programming Languages Sourcebook[M].John While & Sons press, Inc,1997 [8]Jeffrey L.Whitten,Lonnie D.Bentley,Kevin & C.Dittman System Analysis And Design Methords(Fifth Edition):Chapter 5,7,11,15 & ModuleA, MoDuleB,2001.5 Christopher Tolkien AINULINDAL? The Music of the Ainur There was Eru, the One, who in Arda is called Il鷙atar; and he made first the Ainur, the Holy Ones, that were the offspring of his thought, and they were with him before aught else was made. And he spoke to them, propounding to them themes of music; and they sang before him, and he was glad. But for a long while they sang only each alone, or but few together, while the rest hearkened; for each comprehended only that part of me mind of Il鷙atar from which he came, and in the understanding of their brethren they grew but slowly. Yet ever as they listened they came to deeper understanding, and increased in unison and harmony. And it came to pass that Il鷙atar called together all the Ainur and declared to them a mighty theme, unfolding to them things greater and more wonderful than he had yet revealed; and the glory of its beginning and the splendour of its end amazed the Ainur, so that they bowed before Il鷙atar and were silent. Then Il鷙atar said to them: 'Of the theme that I have declared to you, I will now that ye make in harmony together a Great Music. And since I have kindled you with the Flame Imperishable, ye shall show forth your powers in adorning this theme, each with his own thoughts and devices, if he will. But I win sit and hearken, and be glad that through you great beauty has been wakened into song.' Then the voices of the Ainur, like unto harps and lutes, and pipes and trumpets, and viols and organs, and like unto countless choirs singing with words, began to fashion the theme of Il鷙atar to a great music; and a sound arose of endless interchanging melodies woven in harmony that passed beyond hearing into the depths and into the heights, and the places of the dwelling of Il鷙atar were filled to overflowing, and the music and the echo of the music went out into the Void, and it was not void. Never since have the Ainur made any music like to this music, though it has been said that a greater still shall be made before Il鷙atar by the choirs of the Ainur and the Children of Il鷙atar after the end of days. Then the themes of Il鷙atar shall be played aright, and take Being in the moment of their utterance, for all shall then understand fully his intent in their part, and each shall know the comprehension of each, and Il鷙atar shall give to their thoughts the secret fire, being well pleased. But now Il鷙atar sat and hearkened, and for a great while it seemed good to him, for in the music there were no flaws. But as the theme progressed, it came into the heart of Melkor to interweave matters of his own imagining that were not in accord with the theme of Il鷙atar, for he sought therein to increase the power and glory of the part assigned to himself. To Melkor among the Ainur had been given the greatest gifts of power and knowledge, and he had a share in all the gifts of his brethren. He had gone often alone into the void places seeking the Imperishable Flame; for desire grew hot within him to bring into Being things of his own, and it seemed to him that Il鷙atar took no thought for the Void, and he was impatient of its emptiness. Yet he found not the Fire, for it is with Il鷙atar. But being alone he had begun to conceive thoughts of his own unlike those of his brethren. Some of these thoughts he now wove into his music, and straightway discord arose about him, and many that sang nigh him grew despondent, and their thought was disturbed and their music faltered; but some began to attune their music to his rather than to the thought which they had at first. Then the discord of Melkor spread ever wider, and the melodies which had been heard before foundered in a sea of turbulent sound. But Il鷙atar sat and hearkened until it seemed that about his throne there was a raging storm, as of dark waters that made war one upon another in an endless wrath that would not be assuaged. Then Il鷙atar arose, and the Ainur perceived that he smiled; and he lifted up his left hand, and a new theme began amid the storm, like and yet unlike to the former theme, and it gathered power and had new beauty. But the discord of Melkor rose in uproar and contended with it, and again there was a war of sound more violent than before, until many of the Ainur were dismayed and sang no longer, and Melkor had the mastery. Then again Il鷙atar arose, and the Ainur perceived that his countenance was stern; and he lifted up his right hand, and behold! a third theme grew amid the confusion, and it was unlike the others. For it seemed at first soft and sweet, a mere rippling of gentle sounds in delicate melodies; but it could not be quenched, and it took to itself power and profundity. And it seemed at last that there were two musics progressing at one time before the seat of Il鷙atar, and they were utterly at variance. The one was deep and wide and beautiful, but slow and blended with an immeasurable sorrow, from which its beauty chiefly came. The other had now achieved a unity of its own; but it was loud, and vain, and endlessly repeated; and it had little harmony, but rather a clamorous unison as of many trumpets braying upon a few notes. And it essayed to drown the other music by the violence of its voice, but it seemed that its most triumphant notes were taken by the other and woven into its own solemn pattern. In the midst of this strife, whereat the halls of Il鷙atar shook and a tremor ran out into the silences yet unmoved, Il鷙atar arose a third time, and his face was terrible to behold. Then he raised up both his hands, and in one chord, deeper than the Abyss, higher than the Firmament, piercing as the light of the eye of Il鷙atar, the Music ceased. Then Il鷙atar spoke, and he said: 'Mighty are the Ainur, and mightiest among them is Melkor; but that he may know, and all the Ainur, that I am Il鷙atar, those things that ye have sung, I will show them forth, that ye may see what ye have done. And thou, Melkor, shalt see that no theme may be played that hath not its uttermost source in me, nor can any alter the music in my despite. For he that attempteth this shall prove but mine instrument in the devising of things more wonderful, which he himself hath not imagined.' Then the Ainur were afraid, and they did not yet comprehend the words that were said to them; and Melkor was filled with shame, of which came secret anger. But Il鷙atar arose in splendour, and he went forth from the fair regions that he had made for the Ainur; and the Ainur followed him. But when they were come into the Void, Il鷙atar said to them: 'Behold your Music!' And he showed to them a vision, giving to them sight where before was only hearing; arid they saw a new World made visible before them, and it was globed amid the Void, and it was sustained therein, but was not of it. And as they looked and wondered this World began to unfold its history, and it seemed to them that it lived and grew. And when the Ainur had gazed for a while and were silent, Il鷙atar said again: 'Behold your Music! This is your minstrelsy; and each of you shall find contained herein, amid the design that I set before you, all those things which it may seem that he himself devised or added. And thou, Melkor, wilt discover all the secret thoughts of thy mind, and wilt perceive that they are but a part of the whole and tributary to its glory.' And many other things Il鷙atar spoke to the Ainur at that time, and because of their memory of his words, and the knowledge that each has of the music that he himself made, the Ainur know much of what was, and is, and is to come, and few things are unseen by them. Yet some things there are that they cannot see, neither alone nor taking counsel together; for to none but himself has Il鷙atar revealed all that he has in store, and in every age there come forth things that are new and have no foretelling, for they do not proceed from the past. And so it was that as this vision of the World was played before them, the Ainur saw that it contained things which they had not thought. And they saw with amazement the coming of the Children of Il鷙atar, and the habitation that was prepared for them; and they perceived that they themselves in the labour of their music had been busy with the preparation of this dwelling, and yet knew not that it had any purpose beyond its own beauty. For the Children of Il鷙atar were conceived by him alone; and they came with the third theme, and were not in the theme which Il鷙atar propounded at the beginning, and none of the Ainur had part in their making. Therefore when they beheld them, the more did they love them, being things other than themselves, strange and free, wherein they saw the mind of Il鷙atar reflected anew, and learned yet a little more of his wisdom, which otherwise had been hidden even from the Ainur. Now the Children of Il鷙atar are Elves and Men, the Firstborn and the Followers. And amid all the splendours of the World, its vast halls and spaces, and its wheeling fires, Il鷙atar chose a place for their habitation in the Deeps of Time and in the midst of the innumerable stars. And this habitation might seem a little thing to those who consider only the majesty of the Ainur, and not their terrible sharpness; as who should take the whole field of Arda for the foundation of a pillar and so raise it until the cone of its summit were more bitter than a needle; or who consider only the immeasurable vastness of the World, which still the Ainur are shaping, and not the minute precision to which they shape all things therein. But when the Ainur had beheld this habitation in a vision and had seen the Children of Il鷙atar arise therein, then many of the most mighty among them bent all their thought and their desire towards that place. And of these Melkor was the chief, even as he was in the beginning the greatest of the Ainur who took part in the Music. And he feigned, even to himself at first, that he desired to go thither and order all things for the good of the Children of Il鷙atar, controlling the turmoils of the heat and the cold that had come to pass through him. But he desired rather to subdue to his will both Elves and Men, envying the gifts with which Il鷙atar promised to endow them; and he wished himself to have subject and servants, and to be called Lord, and to be a master over other wills. But the other Ainur looked upon this habitation set within the vast spaces of the World, which the Elves call Arda, the Earth; and their hearts rejoiced in light, and their eyes beholding many colours were filled with gladness; but because of the roaring of the sea they felt a great unquiet. And they observed the winds and the air, and the matters of which Arda was made, of iron and stone and silver and gold and many substances: but of all these water they most greatly praised. And it is said by the Eldar that in water there lives yet the echo of the Music of the Ainur more than in any substance else that is in this Earth; and many of the Children of Il鷙atar hearken still unsated to the voices of the Sea, and yet know not for what they listen. Now to water had that Ainu whom the Elves can Ulmo turned his thought, and of all most deeply was he instructed by Il鷙atar in music. But of the airs and winds Manw?most had pondered, who is the noblest of the Ainur. Of the fabric of Earth had Aul?thought, to whom Il鷙atar had given skin and knowledge scarce less than to Melkor; but the delight and pride of Aul?is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work. And Il鷙atar spoke to Ulmo, and said: 'Seest thou not how here in this little realm in the Deeps of Time Melkor hath made war upon thy province? He hath bethought him of bitter cold immoderate, and yet hath not destroyed the beauty of thy fountains, nor of my clear pools. Behold the snow, and the cunning work of frost! Melkor hath devised heats and fire without restraint, and hath not dried up thy desire nor utterly quelled the music of the sea. Behold rather the height and glory of the clouds, and the everchanging mists; and listen to the fall of rain upon the Earth! And in these clouds thou art drawn nearer to The Silmarillion, now published four years after the death of its author, is an account of the Elder Days, or the First Age of the World. In The Lord of the Rings were narrated the great events at the end of the Third Age; but the tales of The Silmarillion are legends deriving from a much deeper past, when Morgoth, the first Dark Lord, dwelt in Middle-earth, and the High Elves made war upon him for the recovery of the Silmarils. Not only, however, does The Silmarillion relate the events of a far earlier time than those of The Lord of the Rings; it is also, in all the essentials of its conception, far the earlier work. Indeed, although it was not then called The Silmarillion, it was already in being half a century ago; and in battered notebooks extending back to 1917 can still be read the earliest versions, often hastily pencilled, of the central stories of the mythology. But it was never published (though some indication of its content could be gleaned from The Lord of the Rings), and throughout my father's long life he never abandoned it, nor ceased even in his last years to work on it. In all that time The Silmarillion, considered simply as a large narrative structure, underwent relatively little radical change; it became long ago a fixed tradition, and background to later writings. But it was far indeed from being a fixed text, and did not remain unchanged even in certain fundamental ideas concerning the nature of the world it portrays; while the same legends came to be retold in longer and shorter forms, and in different styles. As the years passed the changes and variants, both in detail and in larger perspectives, became so complex, so pervasive, and so many-layered that a final and definitive version seemed unattainable. Moreover the old legends ('old' now not only in their derivation from the remote First Age, but also in terms of my father's life) became the vehicle and depository of his profoundest reflections. In h is later writing mythology and poetry sank down behind his theological and philosophical preoccupations: from which arose incompatibilities of tone. I was astonished while watching the news on NHK when the announcer suddenly began talking about me. "...and that concludes our news about Vietnam. Next, domestic topics. "Today, Mr. Tsutomu Morishita invited Miss Akiko Mikawa, a typist at his company, out to tea, but was refused. This was the fifth time Mr. Morishita had invited Miss Mikawa out to tea, though she'd only agreed to accompany him on the first occasion. Since then, he had been turned down repeatedly." "Huh? What, what, what!!" I banged my cup down on the low table and my eyes widened. "Wh-what the devil is this!" My mug shot filled the screen. "The reason for Miss Mikawa's refusal of Mr. Morishita's invitation for a date is not yet known," continued the announcer. "However, according to Miss Hiruma Sakamoto, Miss Mikawa's friend and co-worker, Miss Mikawa does not necessarily dislike Mr. Morishita. It is likely that the reason she refused is that she simply does not like him all that much." A head and shoulders shot of Akiko Mikawa loomed on the screen. "From this, it is believed that Mr. Morishita did not make a particularly strong impression on Miss Mikawa the first time she had tea with him. Meanwhile, informed sources report that tonight Mr. Morishita did not go anywhere after work, but returned directly to his lodgings, where he prepared and is eating dinner by himself. That concludes our news about Mr. Morishita. "In other news, this evening is the night festival at the Yakuyoke Hachiman Shrine in Mizugaoka, Kobe. Let's go to our live report on the festivities from Mr. Mizuno, reporting from the scene." "Yes! Mizuno here..." I sat dazed, blankly watching the screen as the television broadcast the next story. "Whew, that was a shock," I murmured at last. It was an hallucination. It had to be. An illusion, and an auditory hallucination at that. Anything else was unthinkable. In the first place, what was the point of reporting that I had invited Akiko Misawa out, and that I had been soundly turned down as usual? It had no news value. Still, for an hallucination, the photographs of myself and Akiko Mikawa shown on the screen, the style of character used for our names underneath, and the way the announcer had spoken lingered all too vividly in my memory. I shook my head violently. "Impossible!" The news ended. I nodded decisively, then declared resolutely. "It?Ls an illusion. Yes. An illusion." I murmured on. "I guess there really are illusion as clear as this one." "Ha ha ha ha ha!" I laughed. The sound of my low laughter echoed in the four-and-a-half tatami-mat room. I tried imagining what would happen if the story really had been broadcast. If Akiko Mikawa had seen it, or if the guys at the office had seen it, what on earth would they think? I burst out laughing again at the thought, and it just wouldn't stop. "Ah-hahah! Hahahahahahaha! Hee,hee! Hahahahahahaha!" Even after I'd burrowed into my futon, I still couldn't stop laughing for some time. The next morning I was on the human interest page of the newspaper. MISS MIKAWA REFUSES MR. MORISHITA'S INVITATION! "At approximately 4:40 p.m. on the 18th, Mr. Tsutomu Morishita(28), employee of Kasuyama Electric Industry Ltd. of Sanko-machi, Shinjuku Ward, Tokyo, was turned down after asking Miss Akiko Mikawa(23), a typist at the same company, to have tea with him after work. Miss Mikawa said she had to return home early. When he asked Miss Mikawa in the hall, Mr.Morishita was wearing a red necktie with green polka dots purchased the previous day at a Shinjuku supermarket. "Mr. Morishita had no choice but This is the assignment essay for the summer vacation. The assignment was to write an essay titled "A Summer Vacation Trip". I heard that Kano had been to Hawaii with his mother. Farther than that, Fujimori's family took her to Canada, which is much farther than Hawaii. But I had no one to take me to a trip because I have neither Father nor Mother. My Father and Mother died in a traffic accident when I was four years old. Ever since then, I have been living with Grandmother. Everybody is going to make fun of me since I have not travelled anywhere so I cannot write the assignment essay. Yet, to tell the truth, I've had a trip. I went there alone. This is true. The place I've been is much much farther than Hawaii or even Canada. It is the North Pole. I'm not lying, not at all. The reason I could go to such a far place by myself is because I had a letter of invitation from Polar King. The letter went like this: ywhere appeared. He was thin, short, had two children, and lived in a suburban high-rise. He was chief clerk for general affairs at a shipbuilding company. I became, once again, truly nameless. I tried asking Akiko out just once after that to see what would happen. I asked if she would meet me after work at a coffee shop. But Akiko refused. Since I know what kind of woman she was. I felt quite satisfied. After a month, there was no one left who remembered my face apart from my own acquaintances. Yet even so, there were sometimes people who would look startled on seeing my face. One day, in the train on my way back to my apartment, one of two girls sitting on the seat in front of me had that kind of expression on her face. "Gosh. I've seen that man before somewhere," she whispered, nudging the girl beside her with her elbow. Look. This guy. What does he do, I wonder?" The other girl gave me an annoyed glance. Finally she replied uninterestedy, "That guy? Oh, he's just a nobody." Dear Kazuhiro Uno, How are you doing? How is your grandmother? Prices and taxes have gone up too high these days, haven't they? I suppose, Kazuhiro, you will not go out anywhere during the summer vacation. But that will give you trouble when the time comes to write the summer assignment essay. So I invite you to the North Pole. The North Pole is a wonderful place. I would be glad if you'd come. Don't worry about the train fare. Use the ticket I enclosed. I'm looking forward to seeing you. Sincerely,Polar King I showed the letter to Grandmother right away. She was very pleased and the next day she got up early in the morning to prepare a lunch box for me. "Take extra underwear with you as the North Pole is a cold place," said Grandmother, putting my underwear and the lunch box into my bag. She also gave me a thousand yen. In the morning, Friday, August sixteenth, I set out for the North Pole with my bag. Leaving home but going in the opposite direction from school, I turned the corner of Tomoe-Ya Candy Store, and went through Hachiman-Mae Mall, passing Sakura Beauty Parlor, then came out in front of Takasu-Hachiman Station. I presented my ticket from Polar King to the ticket taker. He was surprised at the ticket and said, "Well, well. You'll go all the way to the North Pole all by yourself? Good boy!" A train bound for Hagite-Ochiai came along after I'd been waiting on the platform for a while. There were many people in the train and every one of them gave me a pat on the back when they heard I was visiting the North Pole alone. Passing the railroad bridge across Kamito River and making stops at stations such as Higashi-Tugumo-Cho and Hachiken-Sakagami, the train arrived at Hagite-Ochiai. I had to change there. I asked a railroad officer at the station which train I should transfer to. There were many people on that train too, but I could find a seat. The train rushed, rushed and rushed through rice fields, farms and villages, through forests and woods, through big towns and beaches, through mountains and meadows, through railroad bridges and tunnels, and through countless numbers of them. The train seemed going northward and northward. At the northern end of Japan is Hokkaido. I arrived at Hokkaido by train. According to a railroad officer at Hokkaido Station, the land of Soviet Union is the north of Hokkaido, so you cannot go farther north unless you take a Soviet train. The officer also told me that Japan and the Soviet Union once had been in a bad mood, fighting, invading territories and once friends,--well, now they are still getting along--besides, there had been countless of various other things that you cannot explain in a word, the numbers of complicating, troublesome affairs between them, therefore the Japanese train cannot go into the Soviet land. So I had to walk from Hokkaido Station to the entrance of the Soviet Union. The entrance of the Soviet Union is the exit of Japan. I walked up, up to the north through Hokkaido Mall in front of the station, just as told by the railroad officer of Hokkaido Station. Then I came to the end of Japan. There stood the Soviet entrance gate, as large as the main gate of Tempuku-Ji Temple, and on the entrance was written "Entrance of the Soviet Union" in the Soviet language. I passed through the gate into the Soviet land. From the gate continues the Soviet Mall. There I walked through up and up to the north. Soon, it was noon. I was hungry, so I went into the Noodle Heaven in the Soviet Mall and ordered a bowl of noodle soup to have lunch in my bag with, just like when Grandmother and I had been to the Noodle Heaven in Tempuku-Ji Temple Mall to have lunch. After I finished eating, I paid seventy yen for the noodle, and walked up, up to the north through the mall again. Then I found myself in front of the Soviet Station. I presented my ticket again to the railroad officer of the Soviet Station and got on the train. The Soviet train ran up and up to the north. It rushed, rushed and rushed through rice fields, farms and villages, through forests and woods, through big towns and beaches,through mountains and meadows, over railroad bridges and through tunnels, and through countless numbers of them. his trouble!" It must cost money to print even a single copy of a newspaper. Who on earth would go to all that expense to plot to drive me crazy? I had absolutely no memory of doing anything to make someone hate me. If anything, I suppose it could be that someone else was in love with Akiko Mikawa. But even then, all I'd gotten from her so far was the cold shoulder. I figured that anyone who would try a prank on this scale must be a real loony. But there simply wasn't anyone like that around me. "Oh dear, it would have been better if I hadn't torn up that newspaper." I clicked my tongue at my own short temper. It might have helped me find the criminal, and it would have been evidence once I had him. to return to his lodgings in Kichijoji's Higashi-machi, where he prepared dinner and ate by himself. After dinner, he is believed to have gone straight to bed as usual. It was the fourth time in a row that Miss Mikawa had turned Mr. Morishita's invitation down." There was a mug shot of me. It was the same one I'd seen on television the night before. There was no picture of Akiko Mikawa. Apparently I was the main subject of the story. I read the article over four or five times while I drank some milk. Then I ripped it into shreds and dumped it in the wastebasket. "It's a plot," I muttered. It's somebody's plot. Damn! Going to all t
本文档为【C语言题库管理系统设计—毕业设计论文】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_477730
暂无简介~
格式:doc
大小:669KB
软件:Word
页数:0
分类:工学
上传时间:2017-10-16
浏览量:20