【计算机类职业资格】VB机试章节练习试卷15及答案解析.doc

上传人:diecharacter305 文档编号:1318654 上传时间:2019-10-17 格式:DOC 页数:2 大小:35.50KB
下载 相关 举报
【计算机类职业资格】VB机试章节练习试卷15及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】VB机试章节练习试卷15及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、VB 机试章节练习试卷 15 及答案解析(总分:6.00,做题时间:90 分钟)一、综合应用题(总题数:3,分数:6.00)1.综合应用题()(分数:2.00)_2.在考生文件夹中有一个工程文件 execise31.vbp(相应的窗体文件为 execise31.frm)。窗体 Form1 上有两个标签 Lab1 和 Lab2,标题分别为“密码”和“允许次数”;一个命令按钮 Cmd1:标题为“确定”;两个文本框名称分别为 Text1 和 Text2。其中 Text1 用来输入密码(输入时,显示“*”),无初始内容,Text2 的初始内容为 3。已给出了 Cmd1 的事件过程,但不完整,要求去掉程

2、序中的注释符“”,把程序中的问号“?”改为正确内容,使得在运行时,在 Text1 中输入密码后,单击“确定”按钮,如果输入的是“abcdef”则在 Text1 中显示“密码正确”;如果输入其他内容,单击“确定”后,弹出如下图所示的错误提示对话框,并且 Text2 中的数字减 1。最多可输入 3 次密码,若 3 次都输入错误,则禁止再次输入。(分数:2.00)_3.在考生文件夹中有一个工程文件 execise32.vbp(相应窗体文件为 execise32.frm)。窗体 Form1 中已经给出了所有控件。其功能是:单击“读入”命令按钮,则把考生目录下的 in32.txt 文件中的所有英文字符放

3、入 Text1(可多行显示):如果单击“统计”命令按钮,则统计文本框中字母 A、B、c、D 各自出现的次数,并把结果在文本框中显示出来,如下图所示;如果单击“保存”命令按钮,则把统计结果存入考生文件夹下的 out32.txt 文件中。文件中已给出了“读入”和“保存”按钮的 Click 事件过程。请编写“统计”按钮的 Click 事件过程。 要求: (1)统计每个字母出现的次数时,不区分大小写。 (2)统计后的每个字母的次数必须存入考生文件夹下的 out32.txt 文件中,否则没有成绩。在文件中的格式为: 字母 A出现的次数为 xx 字母 B 出现的次数为 xx 字母 C 出现的次数为 xx

4、字母 D 出现的次数为 xx 注意: 不能修改已经给出的程序部分:在结束程序运行之前,必须单击“保存”按钮,把结果存入 out32.txt 文件,否则无成绩。最后把修改后的文件按原文件名存盘。 (分数:2.00)_VB 机试章节练习试卷 15 答案解析(总分:6.00,做题时间:90 分钟)一、综合应用题(总题数:3,分数:6.00)1.综合应用题()(分数:2.00)_解析:2.在考生文件夹中有一个工程文件 execise31.vbp(相应的窗体文件为 execise31.frm)。窗体 Form1 上有两个标签 Lab1 和 Lab2,标题分别为“密码”和“允许次数”;一个命令按钮 Cmd

5、1:标题为“确定”;两个文本框名称分别为 Text1 和 Text2。其中 Text1 用来输入密码(输入时,显示“*”),无初始内容,Text2 的初始内容为 3。已给出了 Cmd1 的事件过程,但不完整,要求去掉程序中的注释符“”,把程序中的问号“?”改为正确内容,使得在运行时,在 Text1 中输入密码后,单击“确定”按钮,如果输入的是“abcdef”则在 Text1 中显示“密码正确”;如果输入其他内容,单击“确定”后,弹出如下图所示的错误提示对话框,并且 Text2 中的数字减 1。最多可输入 3 次密码,若 3 次都输入错误,则禁止再次输入。(分数:2.00)_正确答案:(正确答案

6、 )解析:3.在考生文件夹中有一个工程文件 execise32.vbp(相应窗体文件为 execise32.frm)。窗体 Form1 中已经给出了所有控件。其功能是:单击“读入”命令按钮,则把考生目录下的 in32.txt 文件中的所有英文字符放入 Text1(可多行显示):如果单击“统计”命令按钮,则统计文本框中字母 A、B、c、D 各自出现的次数,并把结果在文本框中显示出来,如下图所示;如果单击“保存”命令按钮,则把统计结果存入考生文件夹下的 out32.txt 文件中。文件中已给出了“读入”和“保存”按钮的 Click 事件过程。请编写“统计”按钮的 Click 事件过程。 要求: (1)统计每个字母出现的次数时,不区分大小写。 (2)统计后的每个字母的次数必须存入考生文件夹下的 out32.txt 文件中,否则没有成绩。在文件中的格式为: 字母 A出现的次数为 xx 字母 B 出现的次数为 xx 字母 C 出现的次数为 xx 字母 D 出现的次数为 xx 注意: 不能修改已经给出的程序部分:在结束程序运行之前,必须单击“保存”按钮,把结果存入 out32.txt 文件,否则无成绩。最后把修改后的文件按原文件名存盘。 (分数:2.00)_正确答案:(正确答案: )解析:

展开阅读全文
相关资源
猜你喜欢
  • IEC 60805-1985 Guide for commissioning operation and maintenance of storage pumps and of pump-turbines operating as pumps《蓄能泵和作为水泵运行的水泵水轮机的调试、运行和维护指南》.pdf IEC 60805-1985 Guide for commissioning operation and maintenance of storage pumps and of pump-turbines operating as pumps《蓄能泵和作为水泵运行的水泵水轮机的调试、运行和维护指南》.pdf
  • IEC 60806-1984 Determination of the maximum symmetrical radiation field from a rotating anode X-ray tube for medical diagnosis《医疗诊断旋转阳极X射线管最大对称辐射场的测定》.pdf IEC 60806-1984 Determination of the maximum symmetrical radiation field from a rotating anode X-ray tube for medical diagnosis《医疗诊断旋转阳极X射线管最大对称辐射场的测定》.pdf
  • IEC 60807-2 AMD 1-1996 Rectangular connectors for frequencies below 3 MHz - Part 2 Detail specification for a range of connectors with assessed quality with trapezoidal shaped meta.pdf IEC 60807-2 AMD 1-1996 Rectangular connectors for frequencies below 3 MHz - Part 2 Detail specification for a range of connectors with assessed quality with trapezoidal shaped meta.pdf
  • IEC 60807-2-1992 Rectangular connectors for frequencies below 3 MHz part 2 detail specification for a range of connectors with assessed quality with trapezoidal shaped metal shells.pdf IEC 60807-2-1992 Rectangular connectors for frequencies below 3 MHz part 2 detail specification for a range of connectors with assessed quality with trapezoidal shaped metal shells.pdf
  • IEC 60807-3-1990 Rectangular connectors for frequencies below 3 MHz part 3 detail specification for a range of connectors with trapezoidal shaped metal sheels and round contacts re.pdf IEC 60807-3-1990 Rectangular connectors for frequencies below 3 MHz part 3 detail specification for a range of connectors with trapezoidal shaped metal sheels and round contacts re.pdf
  • IEC 60807-6-1988 Rectangular connectors for frequencies below 3 MHz Part 6 Detail specification for a range of rectangular connectors with size 20 (7 5A) round contacts having pola.pdf IEC 60807-6-1988 Rectangular connectors for frequencies below 3 MHz Part 6 Detail specification for a range of rectangular connectors with size 20 (7 5A) round contacts having pola.pdf
  • IEC 60807-7-1991 Rectangular connectors for frequencies below 3 MHz part 7 detail specification for a range of connectors with polarized guides or jackscrews and size 16 (13 A) rou.pdf IEC 60807-7-1991 Rectangular connectors for frequencies below 3 MHz part 7 detail specification for a range of connectors with polarized guides or jackscrews and size 16 (13 A) rou.pdf
  • IEC 60807-9-1993 Rectangular connectors for frequencies below 3 MHz part 9 detail specification for a range of peritelevision connectors《频率低于3MHz的矩形连接器 第9部分 电视机用系列连接器详细规范》.pdf IEC 60807-9-1993 Rectangular connectors for frequencies below 3 MHz part 9 detail specification for a range of peritelevision connectors《频率低于3MHz的矩形连接器 第9部分 电视机用系列连接器详细规范》.pdf
  • IEC 60808-1985 Complementary instrumentation for counting ratemeters Characteristics and test methods《计数率表辅助设备 特性和试验方法》.pdf IEC 60808-1985 Complementary instrumentation for counting ratemeters Characteristics and test methods《计数率表辅助设备 特性和试验方法》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1