大连交通大学jsp考试试卷试卷B

合集下载

(关闭1)2020届交大捷普校招试题-web前端开发工程师

(关闭1)2020届交大捷普校招试题-web前端开发工程师

(关闭1)2020届交大捷普校招试题-web前端开发工程师基本信息:[矩阵文本题] *一、单选题(共45分,共15题,每题3分)1、以下说法不正确的是( ) [单选题] *A、JS中变量、函数、对象及方法严格区分大小写。

B、JS变量名或函数名不能以“$”开头。

(正确答案)C、JS变量或函数名可以是扩展的ASCII码以及Unicode字符。

D、JS语句以一个分号结尾,如果省略分号,则由解析器确定语句的结尾。

2、关于JavaScript说法不正确的是( ) [单选题] *A、它是一种解释性执行的脚本语言;B、JavaScript是一种基于对象的脚本语言,其函数也可以视做类;C、JavaScript的数据类型具有动态性,是一种弱类型脚本语言;D、JavaScript是Java的脚本语言,二者具有紧密联系。

(正确答案)3、以下哪一项不是浏览器BOM对象( ) [单选题] *A、documentB、location;C、screen;D、localStorage(正确答案)4、当HTML中有多个相同id的标签,document.getElementById获取的是( )对象. [单选题] *A、第一个(正确答案)B、最后一个C、所有该id的D、无法获取,因为id是DOM唯一标识5、以下哪个选项不是JS Array类型的方法( ) [单选题] *A、sortB、split(正确答案)C、reduceD、map6、下面代码运行后,浏览器将提示()<script>var a=true,b=1; alert('a+b='+a+b);</script> [单选题] *A、a+b=true1(正确答案)B、a+b=2C、a+b=11D、以上答案均不正确7、产生一个1~10之间(包含1和10)随机整数的表达式是( ) [单选题] *A、Math.floor(Math.random()*10)B、Math.floor(Math.random()*11)C、Math.ceil(Math.random()*11)D、Math.ceil(Math.random()*10)(正确答案)8、以下哪个选项可正确获取到当月月份( ) [单选题] *A、new Date().getMonth()B、new Date().getMonth()+1(正确答案)C、new Date().getDate()D、new Date().getDay ()9、以下关于localStorage说法不正确的是( ) [单选题] *A、用于在本地存储数据,IE浏览器需要ie8及以上版本才能使用;B、localStorage存储的数据包括可以是string类型,也可是object类型;(正确答案)C、在浏览器的隐私模式下面localStorage是不可读取的;D、localStorage属于永久性存储,浏览器关闭后不会丢失。

大连交通大学jsp考试试卷试卷B

大连交通大学jsp考试试卷试卷B

教研室主任(签字)学院院长(系主任)(签字)大连交通大学试卷2011 ~2012 学年第二学期课程JSP基础与应用(B卷)(R机械08级)一、选择题(本题为单选,共15题,每题2分,总计30分)1、假设B.jsp保存在web服务目录的根目录ROOT中,下列哪种方式是正确访问B.jsp的正确方式:A、http://localhost:8080/B.jspB、http://localhost:8080/ROOT/B.jspC、http://localhost:8080/webapps/B.jspD、http://localhost:8080/webapps/ROOT/B.jsp2、假设B.jsp,它的文件路径如下:%TOMCATHOME%\webapps\MyJSP\B.jsp,在 B.jsp中使用Circle类创建JavaBean对象,Circle类位于red.star包下,那么Circle类的class文件应该如何放置?A、webapps\ MyJSP \red\star\Circle.classB、webapps\MyJSP \classes\ red\star \Circle.classC、webapps\ MyJSP \WEB-INF\red\star\Circle.classD、webapps\MyJSP\WEB-INF\classes\ red\star\Circle.class3、假定当前的Web服务目录名称为girl,那么web.xml部署描述文件应该存放在哪个位置?A、WEB-INF\girl \web.xmlB、girl\WEB-INF\classes \web.xmlC、classes \ girl \web.xmlD、girl\WEB-INF \web.xml4、假设在Web服务目录sun中有一个Servlet类,它在web.xml文件中的配置如下:<servlet><servlet-name> Hello </servlet-name><servlet-class>tom.jiafei.Servlet</servlet-class></servlet><servlet-mapping><servlet-name> Hello </servlet-name><url-pattern>/hello</url-pattern></servlet-mapping>那么在浏览器端访问Hello对象的URL是什么?A、http://localhost:8080/sun/ helloB、http://localhost:8080/sun/ HelloC、http://localhost:8080/ tom/jiafei/ServletD、http://localhost:8080/sun/tom/jiafei/ hello装订线5.下列方法中,response对象调用哪个方法能够动态改变页面的MIME类型?A、setStatus()B、encodeRedirectURL()C、sendRedirect()D、setContentType()6.session对象调用哪个方法可以获取所有对象所对应的关键字,并将关键字放在一个枚举类型的变量中?A、removeAttribute()B、setAttribute() C getAttribute() D、getAttributeNames()7.下列关于page指令用法的描述正确的是()A、page指令作用于整个JSP页面B、必须将其放在JSP文件的开头C、page指令中所有属性可以指定多值D、page指令中的所有属性只能出现一次8.下列对于表达式的描述,错误项为( )A、表达式必须能求值;B、表达式由服务器负责计算;C、在<%= 和%>之间可以插入语句;D、在<%= 和%>之间插入一个表达式。

2022年大连交通大学计算机网络技术专业《计算机网络》科目期末试卷A(有答案)

2022年大连交通大学计算机网络技术专业《计算机网络》科目期末试卷A(有答案)

2022年大连交通大学计算机网络技术专业《计算机网络》科目期末试卷A(有答案)一、选择题1、假设OS1参考模型的应用层欲发送400B的数据(无拆分),除物理层和应用层之外,其他各层在封装PDU时均引入20B的额外开销,则应用层数据传输率约为()。

A.80%B.83%C.87%D.91%2、比特的传播时延与链路带宽的关系是()。

A.没有关系B.反比关系C.正比关系D.无法确定3、UDP数据报比IP数据报多提供了()服务。

A.流量控制B.拥塞控制C.端口功能D.路由转发4、在一个网络中,最大TPDU尺寸为256B,最大的TPDU存活时间为20s,使用8位序列号,则每条连接的最大数据传输速率是()。

A.16112bit/sB.26112bitsC.36112bi/sD.461l2bit/s5、以太网帧的最小长度是()。

A.32B.64C.128D.2566、下列关于交换机的叙述中,正确的是()A.以太网交换机本质上是一种多端口网桥B.通过交换机互连的一组工作站构成一个冲突域C.交换机每个端口所连网络构成一个独立的广播域D.以太网交换机可实现采用不同网络层协议的网络互连7、为了使模拟信号传输得更远,可以采用的设备是()。

A.中继器B.放大器C.交换机D.路由器8、因特网上的数据交换方式是()。

A.电路交换B.报文交换C.分组交换D.光交换9、下列关于单模光纤的描述中,正确的是()A.单模光纤的成本比多模光纤的成本低B.单模光纤传输距离比多模光纤短C.光在单模光纤中通过内部反射来传播D.单模光纤的直径一般比多模光纤小10、通过"Internet信息服务(IIS)管理器”管理单元可以配置FTP服务器,若将控制端口设置为2222,则数据端口自动设置为()。

A.20B.21C.2223D.222111、在TCP/IP协议簇中,应用层的各种服务是建立在传输层提供服务的基础上的。

下列协议组中()需要使用传输层的TCP建立连接。

大连交通大学操作系统考试题

大连交通大学操作系统考试题

大连交通大学操作系统考试题1、10.字长是CPU的主要技术性能指标之一,它表示的是()。

[单选题] *A.CPU的计算结果的有效数字长度B.CPU一次能处理二进制数据的位数(正确答案)C.CPU能表示的最大的有效数字位数D.CPU能表示的十进制整数的位数2、B:二进制位(bit)(正确答案)C:字(Word)D:双字(Double Word)计算机技术中,下列度量存储器容量的单位中,最大的单位是______。

[单选题] * A:KB3、在计算机系统软件中被称为核心的是()。

[单选题] *A.操作系统(正确答案)B.语言处理系统C.数据库处理系统D.实用程序4、在TCP/IP 网络上,主机采用()标识中[单选题] *A. 端口号B.MAC 地址C. IP 地址(正确答案)D. 以上都不是5、双绞线把两根绝缘的铜导线按一定密度互相绞在一起,可以降低()的程度。

[单选题] *A声音干扰B温度干扰C信号干扰(正确答案)D湿度干扰6、83.根据Internet的域名代码规定,域名中的表示商业组织的网站()。

[单选题] *A.,netB.,com(正确答案)D.,org7、PPP 协议用在SONET/SDH 链路时,采用零比特填充法透明传输比特串“”,, 则比特填充后的输出为()中[单选题] *A.B.C.D.(正确答案)8、下列各软件中,不是系统软件的是______。

[单选题] *A:操作系统B:语言处理系统C:指挥信息系统(正确答案)D:数据库管理系统9、在计算机中,一个字节所包含二进制位的个数是()。

[单选题] *A)(B)(C)((正确答案)10、WPS文字中,要在不同页面设置不同的页眉,首先要做的是插入()。

[单选题] *A. 分隔符B. 分节符(正确答案)C. 分栏符11、MAC 地址通常存储在计算机的()。

易[单选题] *A.网卡上(正确答案)B.内存中C.高速缓存中D.硬盘上12、用户的机器选配的显卡,安装调试时出现雪花状斑点,无法消除,请分析原因()。

大连交大RAD题库

大连交大RAD题库

1. 下面哪一个是J2EE的Web组件()A、AppletB、JSPC、W ASD、EJB2. 在Java 透视图中,下面哪三个可以通过自己的向导创建()A、PackageB、ClassC、MethodD、Interface3. 用户想要查找一个方法名叫作setABCValue或者setDFEvalue的方法,最直接的方法应该是应该()A、选择Reference in limit to pane,然后输入查找字段“*value*”B、选择Reference in limit to pane,然后输入查找字段“set*value”C、选择Declarations in limit to pane,然后输入查找字段“*value*”D、选择Declarations in limit to pane,然后输入查找字段“set*value*”4. <jsp:useBean>的scope的默认值()A、sessionB、applicationC、pageD、request5. 开发人员希望创建一个只含有HTML文件和图片的项目。

在新建项目向导开发人员应该选择哪个选项()A、动态Web项目B、静态Web项目C、Java项目D、Server项目6. RAD中的页面设计器支持下列哪三个元素()A、xmlB、ASPC、JavaScriptD、JSP7.关于JSP的说法下面哪两项是正确的()A、JSP在服务器端被执行B、JSP的最终存在形式是servletC、JSP在客户端被执行D、JSP的最终存在形式是java application8. “sales”web项目的war包发布时要用的文件在文件系统中应位于()A、sales/web contentB、sales/web-infC、sales/sourceD、sales/libraries9. RAD不能用来()A、编辑HTML文件B、调试Java程序C、提供W AS的服务功能D、提供TOMCA T的测试环境10. 为创建新的数据库表,必须在哪个视图下工作()A、SchemaB、DB serversC、Data definitionD、Navigator11、在Servlet生命周期的结束阶段哪个方法负责执行释放资源()A. doGet()B.doPost()C.init()D.destroy()12、RAD中支持下列哪种文件类型的导入和导出()A. War文件B. exe文件C. NAR文件D. xsl文件13. 一个类有main()方法。

大连交通大学JSP期末考试知识点总结

大连交通大学JSP期末考试知识点总结

JSP各章知识点总结去年考试题型:一、选择题(2分×15=30分)二、填空题(1分×15=15分)三、读程序写结果(3分×5=15分)JavaBean(2分×10=20分)四、程序填空数据库(2分×10=20分)第一章JSP简介1.8080是Tomcat服务器默认占用的端口。

2.如果Tomcat服务器的安装目录是:D\apache—tomcat—5.5.20\,那么Tomcat的web服务目录的根目录是:D\apache—tomcat—5.5.20\webapps\Root3.用户访问JSP页面,在浏览器键入Tomcat的IP地址、端口号、JSP页面的名字例如:IP:192.168.1.200名字:example 1则用户在浏览器中键入的内容为:http://192.168.1.200:8080/ example 14. Tomcat服务器安装目录的webapps目录下的任何一个子目录都可以作为一个web服务目录5.JSP与Java Servlet的关系JSP技术屏蔽了Servlet对象的创建过程,使得Web程序设计者只需关心JSP页面本身的结构和设计好的各种标记,比如使用HTML标记设计页面的视图,使用Javabean标记有效地分离页面视图和数据库。

第二章JSP语法1.JSP页面:在传统的HTML页面文件中加入Java程序片和JSP标记就构成了一个JSP页面普通的HTML标记符JSP标记,如指令标记、动作标记2.JSP页面的组成变量和方法的声明Java程序片Java表达式3.在“<%!”和“%>”标记符号之间声明变量和方法4.成员变量:在“<%!”和“%>”标记符之间声明变量,这些变量称为JSP页面的成员变量(只被初始化一次,被所有共享)局部变量:在“<%!”和“%>”之间插入Java程序片,在程序片中声明的变量称为JSP页面的局部变量(每个用户所对应的局部变量不同)5.在“<%=”和“%>”插入一个表达式(不可插入语句,“<%=”是一个完整的符号。

2022年大连交通大学数据科学与大数据技术专业《计算机系统结构》科目期末试卷B(有答案)

2022年大连交通大学数据科学与大数据技术专业《计算机系统结构》科目期末试卷B(有答案)

2022年大连交通大学数据科学与大数据技术专业《计算机系统结构》科目期末试卷B(有答案)一、选择题1、对系统程序员不透明的应当是()A.CACHE 存储器B.系列机各档不同的数据通路宽度C.指令缓冲寄存器D.虚拟存储器2、对机器语言程序员透明的是()A.中断字B.主存地址寄存器C.通用寄存器D.条件码3、下列关于标量流水机的说法不正确的是()A.可对标量数据进行流水处理B.没有向量数据表示C.不能对向量数据进行运算D.可以对向量、数组进行运算4、高级语言程序经()的()成汇编语言程序。

A.编译程序,翻译B.汇编程序,翻译C.汇编程序,解释D.编译程序,解释5、与流水线最大吞吐率高低有关的是( )A.各个子过程的时间B.最快子过程的时间C.最慢子过程的时间D.最后子过程的时间6、从计算机系统结构上讲,机器语言程序员所看到的机器属性是()A.计算机软件所要完成的功能B.计算机硬件的全部组成C.编程要用到的硬件组织D.计算机各部件的硬件实现。

7、计算机组成设计不考虑( )。

A.专用部件设置B.功能部件的集成度C.控制机构的组成D.缓冲技术8、对系统程序员不透明的应当是( )。

A.Cache存贮器XB.系列机各档不同的数据通路宽度C.指令缓冲寄存器D.虚拟存贮器9、非线性流水线是指( )A.一次运算中使用流水线中的多个功能段B.一次运算中要多次使用流水线中的某些功能段C.流水线中某些功能段在各次运算中的作用不同D.流水线的各个功能段在各种运算中有不同的组合10、以下说法不正确的是( )A.线性流水线是单功能流水线B.动态流水线是多功能流水线C.静态流水线是多功能流水线D.动态流水线只能是单功能流水线二、填空题11、数据流机采用________,执行的操作序列取决于输入数据的可用性;归约机则采用________,执行的操作序列取决于对数据的要求,对数据的需求又来源于函数式程序设计语言对表达式的归纳。

12、基于存储器-存储器的向量指令是指________来自________,两种结或把而且把操作后的结果直接写入存储器。

10-11第二学期RAD(大补)

10-11第二学期RAD(大补)

教研室主任(签字)学院院长(系主任)(签字)大连交通大学试卷A 、JAFB 、JDNIC 、JDBCD 、J2C 5. 可以使用WAS 的控制台安装应用程序的什么格式的文件( ) A 、EAR B 、DOC C 、JAR D 、DAT 6. RAD 是一个最适合用来开发什么应用的IDE( ) A 、Applet B 、SWT C 、J2EE D 、WEB 页面 7. 指定保存文件的天数应该使用RAD 的哪个菜单项实现( ) A 、窗口 > 首选项 > 自动构建 B 、窗口 > 首选项 > 工作台 C 、窗口 > 首选项 > Java D 、窗口 > 首选项 > web 工具 8. “web ”透视图默认包含的视图不包括:( ) A 、DB 输出视图 B 、项目资源管理器视图 C 、控制台视图 D 、服务器视图 9. Servlet 运行在( ) A 、服务器端 B 、客户端 C 、EIS 层 D 、EJB 容器中 10. 为调试程序,必须在哪个透视图下工作( ) A 、Debug B 、DB servers C 、web D 、J2EE 11. 在Servlet 中,哪个方法用于处理初始化过程( ) A. doGet() B.doPost() C.init() D.destroy() 12. 关于JSP 技术,下面说法不正确的是( ) A. JSP 开发的Web 应用是跨平台的 B. JSP 支持可重用的基于组件的设计C. Web 服务器在遇到访问JSP 网页的请求时,首先执行其中的程序段,然后将执行结果连同JSP 文件中的HTML 代码一起返回给客户D. JSP 在客户端执行13. JSP 内置对象的哪个方法可以返回请求实体的MIME 类型( )A 、getProtocol()B 、getContentType()C 、getServletPort()D 、getParameter()订线A. <!-- 注释 -->B. <%=注释 %>C. <%-- 注释 --%>D. <!% 注释 %> 15. RAD 中哪个视图可以支持JSP 页面上拖拽元素( )A 、选用板视图B 、控制台视图C 、大纲视图D 、预览视图16. RAD 中哪个视图可以查看java 程序中的任意位置的System.out.println 的输出结果( )A 、选用版视图B 、控制台视图C 、大纲视图D 、预览视图 17. 下面哪一个不能作为JavaBean 的属性类型( )A 、BoundB 、SimpleC 、moneyD 、Index18. RAD 数据透视图中,哪个视图负责管理数据库的连接,并显示已加载数据库连接的各项信息( )A 、数据库资源管理器视图B 、数据定义视图C 、导航器视图D 、数据输出视图 19. Struts 架构中,实现控制器的组件是( )A 、actionservletB 、actionformC 、actionfowardsD 、actionmapping 20. Struts 架构中,Action 的主要功能不包括( )A 、实现应用程序的事务逻辑,负责处理请求。

jsp考试题及答案大学

jsp考试题及答案大学

jsp考试题及答案大学JSP考试题及答案(大学)一、选择题(每题2分,共20分)1. JSP(JavaServer Pages)是一种:A. 服务器端的脚本语言B. 客户端的脚本语言C. 桌面应用程序D. 数据库管理系统答案:A2. 在JSP中,标准的自定义标签开始标记是:A. <%@ tag >B. <% tag >C. <@ tag >D. <$ tag >答案:A3. JSP页面中的注释,不会在客户端浏览器中显示的是:A. <!-- ... -->B. // ...C. <%=-- ... --%>D. <%-- ... --%>答案:D4. 下列哪个不是JSP内置对象?A. requestB. responseC. outD. applet答案:D5. JSP页面中,将Java代码片段放入到脚本元素中使用的是:A. <% ... %>B. <%= ... %>C. <%! ... %>D. <%@ ... %>答案:A6. JSP中,将数据库查询结果集传递给JSP页面的正确方法是:A. 使用request对象B. 使用response对象C. 使用session对象D. 使用application对象答案:A7. JSP页面被请求时,以下哪个过程不会发生?A. 编译成Servlet类B. 执行ServletC. 转换成HTMLD. 保存为文本文件答案:D8. 在JSP页面中,使用EL表达式获取请求参数的正确方式是:A. ${}B. ${}C. ${}D. ${}答案:A9. 下列哪个不是JSP动作元素?A. <jsp:forward>B. <jsp:include>C. <jsp:useBean>D. <jsp:loop>答案:D10. 在JSP中,错误页面是一种:A. ServletB. JSP页面C. HTML页面D. Java类答案:B二、简答题(每题5分,共30分)1. 请简述JSP和Servlet的区别。

大连交通大学c语言题库(10套)最全

大连交通大学c语言题库(10套)最全
题号:1826
预处理命令行都必须以_____号开始.
答案:空1:#பைடு நூலகம்
题号:2025
将函数funl的入口地址赋给指针变量p的语句是_____.
答案:空1:p=funl;
题号:5788
设有以下共用体类型说明和变量定义,则变量a在内存所占字节数是_____。union stud { char num[6]; float s[4]; double ave; } a,*p;
D、a在和中均不生效.
答案:B
题号:1945
设有如下函数定义
int f(char *s)
{char *p=s;
while(*p!='\0') p++;
return (p-s);
}
如果在主程序中用下面的语句调用上述函数,
则输出结果是( ).
printf("%d\n",f("goodbye!"));
A、3
答案:正确
题号:1582
C语言所有函数都是外部函数.
答案:错误
题号:1746
在C语言中,程序总是从第一个函数开始执行,最后一个函数结束.
答案:错误
题号:1836
在定义宏时,在宏名与带参数的括弧之间不应加空格.
答案:正确
填空
题号:229
C语言中,_____是程序的基本组成部分.
答案:空1:函数
题号:511
D、scanf ("%f%u", &a,&i);
答案:C
题号:1177
假定有以下变量定义:
int k=7,x=12;
则能使值为3的表达式是:( )

大连交通大学jsp期末考试模拟试卷

大连交通大学jsp期末考试模拟试卷

教研室主任(签字)学院院长(系主任)(签字)一、选择题(本题为单选,共15题,每题2分,总计30分)1、假设MyJSP是一个Web服务目录,B.jsp保存在MyJSP 的目录中,下列哪种方式是正确访问B.jsp的方式:A、http://localhost:8080/webapps/MyJSP/B.jspB、http://localhost:8080/B.jspC、http://localhost:8080/MyJSP/B.jspD、http://localhost:8080/ROOT/MyJSP/B.jsp2、假设B.jsp,它的文件路径如下:%TOMCATHOME%\webapps\MyJSP\moon\B.jsp,在B.jsp中使用Circle类创建JavaBean对象,Circle类位于red.star包下,那么这个类的class文件应该如何放置?A、webapps\MyJSP\WEB-INF\classes\red\star\ Circle.classB、webapps\MyJSP \moon\WEB-INF\class\red\star \ Circle.classC、webapps\moon\WEB-INF\classes\red\star\ Circle.classD、webapps\MyJSP\moon\classes\red\star\Circle.class3、假定当前的Web服务目录名称为moon,那么web.xml部署描述文件应该存放在哪个位置?()A、moon \classes\web.xmlB、moon\WEB-INF\classes \web.xmlC、WEB-INF\classes\moon \web.xmlD、moon\WEB-INF \web.xml4、下列文件中()文件用来启动Tomcat服务器的。

A、web.xmlB、server.xmlC、startup.batD、以上皆非5、当用request对象获取客户提交的汉字字符时,会出现乱码问题,所以对含有汉字字符的信息必须进行特殊的处理,下面说法正确的是()。

2022年大连交通大学计算机科学与技术专业《数据库原理》科目期末试卷B(有答案)

2022年大连交通大学计算机科学与技术专业《数据库原理》科目期末试卷B(有答案)

2022年大连交通大学计算机科学与技术专业《数据库原理》科目期末试卷B(有答案)一、填空题1、在SQL Server 2000中,数据页的大小是8KB。

某数据库表有1000行数据,每行需要5000字节空间,则此数据库表需要占用的数据页数为_____页。

2、SQL Server中数据完整性包括______、______和______。

3、有两种基本类型的锁,它们是______和______。

4、数据仓库创建后,首先从______中抽取所需要的数据到数据准备区,在数据准备区中经过净化处理______,再加载到数据仓库中,最后根据用户的需求将数据发布到______。

5、在一个关系R中,若每个数据项都是不可再分割的,那么R一定属于______。

6、在RDBMS中,通过某种代价模型计算各种查询的执行代价。

在集中式数据库中,查询的执行开销主要包括______和______代价。

在多用户数据库中,还应考虑查询的内存代价开销。

7、视图是一个虚表,它是从______导出的表。

在数据库中,只存放视图的______,不存放视图对应的______。

8、在SQL Server 2000中,新建了一个SQL Server身份验证模式的登录账户LOG,现希望LOG在数据库服务器上具有全部的操作权限,下述语句是为LOG授权的语句,请补全该语句。

EXEC sp_addsrvrolemember‘LOG’,_____;9、在设计局部E-R图时,由于各个子系统分别有不同的应用,而且往往是由不同的设计人员设计,所以各个局部E-R图之间难免有不一致的地方,称为冲突。

这些冲突主要有______、______和______3类。

10、使某个事务永远处于等待状态,得不到执行的现象称为______。

有两个或两个以上的事务处于等待状态,每个事务都在等待其中另一个事务解除封锁,它才能继续下去,结果任何一个事务都无法执行,这种现象称为______。

二、判断题11、在关系数据库中,属性的排列顺序是可以颠倒的。

2022年大连交通大学数据科学与大数据技术专业《操作系统》科目期末试卷B(有答案)

2022年大连交通大学数据科学与大数据技术专业《操作系统》科目期末试卷B(有答案)

2022年大连交通大学数据科学与大数据技术专业《操作系统》科目期末试卷B(有答案)一、选择题1、下列关于批处理系统的叙述中,正确的是()I.批处理系统允许多个用户与计算机直接交互II.批处理系统分为单道批处理系统和多道批处理系统III.中断技术使得多道批处理系统的1/O设备可与CPU并行工作A.仅II、IIIB.仅IIC.仅I、IID. 仅I、III2、下列选项中,不是操作系统关心的主要问题的是()。

A.管理计算机裸机B.设计、提供用户程序与计算机及计算机硬件系统的接口C.管理计算机中的信息资源D.高级程序设计语言的编译3、有若干并发进程均将一个共享变量count的值加1一次,那么有关count中的值的说法正确的是()。

I.肯定有不正确的结果II.肯定有正确的结果,III.若控制这些并发进程互斥执行count加1操作,count中的值正确A. I和IIIB.II和IIIC.IIID. I、II和III的说法均不正确4、下列描述中,()并不是多线程系统的特长。

A.利用线程并行地执行矩阵乘法运算B.Web服务器利用线程响应HTTP请求C.键盘驱动程序为每个正在运行的应用配备一个线程,用以响应该应用的键盘输入,D.基于GUI的调试程序用不同的线程分别处理用户输入、计算和跟踪等操作5、使用TSL(TestandSetLock)指令实现进程互斥的伪代码如下所示。

do{while(TSL(&lock));criticalsection;lock=FALSE;}while(TRUE);下列与该实现机制相关的叙述中,正确的是()A.退出临界区的进程负责唤醒阻塞态进程B.等待进入临界区的进程不会主动放弃CPUC.上述伪代码满足“让权等待”的同步准则D.while(TSL(&lock))语句应在关中断状态下执行6、下列关于设备驱动程序的叙述中,正确的是()。

I.与设备相关的中断处理过程是由设备驱动程序完成的II.由于驱动程序与I/O设备(硬件)紧密相关,故必须全部用汇编语言书写III.磁盘的调度程序是在设备驱动程序中运行的IV.一个计算机系统配置了2台同类绘图机和3台同类打印机,为了正确驱动这些设备,系统应该提供5个设备驱动程序A. 仅I、IIIB. 仅II、IIIC.仅I、III,IVD. I、II、III、IV7、提高单机资源利用率的关键技术是()。

大连交通大学《计算机网络》期末考试复习习题(精简版)

大连交通大学《计算机网络》期末考试复习习题(精简版)

计算机网络复习题一、单项选择1.Which of following is not an application-layer protocol? ( B)A. HTTPB. TCPC.SMTPD.FTP2.The PDU of network-layer is called ( C).A. messageB. segmentC. datagramD. frame3. An HTTP client often uses the (B ) method when the user fills out a form.A.GETB. POSTC. HEADD. PUT4.The default port number of DNS is(C )A.80B.21C.53D.255.Which of the following is not a mail access protocol? ( C)A.POP3B.IMAPC.HTTPD.SMTP6.Which protocol is not a network-layer protocol? (C )A.ICMP ProtocolB.routing protocolC.PPPD.IP Protocol7.The SYN segment is used for(B ).A. TCP flow controlB. TCP connection setupC. TCP congestion controlD. Closing a TCP connection8.Which field in a TCP segment is used for flow control? ( A)A. receive windowB. sequence numberC. acknowledgementD. Internet checksum9.A (A ) is the interface between the application layer and the transport layer within a host.A. socketB. bridgeC. EthernetD. hub10.In network-layer, which protocol is used for reporting errors? ( B)A.SMTPB.ICMPC.ARPD.CSMA11.Which protocol is an intra-autonomous system routing protocol? ( D)A. ARPB. ICMPC. BGPD. RIP12.MAC address is ( B) bits long.A.32B.48C.128D.6413. ( A ) means that the switch must receive the entire packet before it can begin to transmit the first bit of the packet onto the outbound link.A. store-and-forward transmissionB. FDMC. end-to-end connectionD. TDM14. In the following four descriptions, which one is correct? ( C )A In C/S architecture, clients communicate with each other directly.B In C/S architecture, client has a fixed well-known address.C In P2P architecture, peers communicate with each other directly.D In P2P architecture, peer has a fixed well-known address.15.Which of following is not an application-layer protocol? ( B )A. HTTPB. TCPC. DNSD. SMTP16. ( B ) header line indicates the time and date when the object was created or last modified.A. Date:B. Last-Modified:C. Connection:D.If-Modified-Since:17.A ( A ) provides logical communication between processes runningon different hosts. A ( ) provides logical communication between hosts.A. transport-layer protocol, network-layer protocolB. network-layer protocol, transport-layer protocolC. transport-layer protocol, application-layer protocolD. network-layer protocol, link-layer protocol18.Suppose TCP sender is in slow start state and the CongWin is8, then what’s the value of CongWin after one RTT? ( D )A. 9B. 10C. 4D. 1619.( B ) header allows the receiving user agent to take an appropriate action on the message.A. Content-Transfer-Encoding:B. Content-Type:C. From:D. To:20. The request message in the conditional GET must include the header line.Cst-Modifiedst-ReferencedC.If-Modified-SinceD.If –Referenced-Since21. Which of the following services is not provided by TCP? (A)A.Delay guarantees and bandwidth guaranteesB.Reliable data transferC.Congestion controlD.Flow control22. In the LAN,(C )protocol dynamically assign IP addresses to hosts.A.DNSB.ARPC.DHCPD.IP23. ___A_ is the ability to determine the interfaces to which a frame should be directed, and then directing the frame to those interfaces.A.ForwardingB.FilteringC.RoutingD.Switching24. Which of the following is not a routing protocol?( A)A.TCPB.RIPC.OSPFD. BGP25. For 10BaseT, the maximum length of the connection between an adapterand the hub is A meters.A.100B.200C.500D.1026. In a TCP segment, ___A_ is the byte-stream number of the first bytein the segment.A.sequence numberB.aCK numberC.checksumD.port number27. A ( A ) provides logical communication between processes runningon different hosts. A ( ) provides logical communication between hosts.A. transport-layer protocol, network-layer protocolB. network-layer protocol, transport-layer protocolC. transport-layer protocol, application-layer protocolD. network-layer protocol, link-layer protocol二、填空1. A total nodal delay includes nodal processing delay, queuing delay,transmission delay , and propagation delay.2.In the context of a communication session between a pair of processes,the process that initiates the communication is labeled as the client . The process that waits to be contacted to begin the sessionis the server .3. A process sends messages into ,and receives messages from, thenetwork through its socket .4.FTP uses two parallel TCP connections to transfer a file, they aredata connection and control connection .5. DNS protocol translates hostname to IP address.6. A transport-layer protocol provides logical communication betweenprocesses running on different hosts. A network-layer protocolprovides logical communication between hosts .7.In IPv6 datagram format, IP address is 128 bits long.8.There are three 16-bit words: 0110011001100000, 0101010101010101,1000111100001100. Their checksum is 1011 0101 0011 1101 .9.RcvBuffer=100, LastByteRcvd=58, LastByteRead=23, then RcvWindow=6510. ARP protocol can convert the IP address to MAC address.11.R TT is the time it takes for a small packet to travel from clientto server and then back to the client.12.T he Internet mail system has three components which they are useragent, SMTP , mail server .13.T here are currently a number of popular mail access protocols,including POP3 , IMAP , and SMTP.14.DNS protocol can convert the hostname to IP address.15.This job of delivering the data in a transport-layer segment to thecorrect socket is called demultiplexing . The job of gathering data chunks at the source host from different sockets, encapsulating each data chunk with header information to create segments, and passing the segments to the network layer is called multiplexing.16.F iltering is the ability of a switch to determine whether a frameshould be forwarded to some interface or should just be dropped.Forwarding is the ability to determine the interfaces to which a frame should be directed, and then directing the frame to those interfaces.17.C onsider the data D is 01110010001, if use even parity checkingapproach, the parity bit is 1 , if use odd parity checking approach, the parity bit is 0 .18.T he units of data exchanged by a network-layer protocol are called(datagram ).19.There are two classes of packet-switched networks: (virtual circuit)networks and datagram networks.20.Provided RcvBuffer=200,LastByteRcvd=150,LastByteRead=80, thenRcvWindow=( 130 ).21.T he two most important network-layer functions in a datagram networkare ( forwarding ) and ( routing ).has a ( 32 )bit address , and MAC address is ( 48 ) bits.22.I PV423.T he ( ARP ) protocol can translate IP address into MAC address,and the ( DNS ) protocol can translate hostname into IP address 三、判断对错1.The propagation delay is the amout of time required to push all of the packet’s bits into the link.(F)2.The size of the TCP RcvWindow never changes throughout the duration of the connection.(F)3.Ethernet’s multiple access protocol is CDMA.(F)4.The Internet is a kind of vircuit curcuit network.(F) 5.Currently, the Internet does not provides a service that makes promises about how long it will take to deliver the data from sender to receiver.(T)6.TCP and UDP don’t guarantee a minimum transmission rate, but theyprovide delay guarantees. (F)7.HTTP uses TCP as its underlying transport protocol rather than running on top of UDP.(T)8.The sequence number for a segment is therefore the byte-stream number of the first byte in the segment.(T)9.Both routers and switches are plug and play devices. (F)10.TCP provides flow control by having the sender maintain a variable called the receive window.(T)11.With persistent connections, the server leaves the TCP connection open after sending a response.(T)12.The Last-modified: header in the HTTP response message indicates when the object in the response message was last modified.(F) 13.The job of delivering the data in a transport-layer segment to the correct socket is called multiplexing.( F)14. A datagram may be handled by different link-layer protocols on the different links in the path.( T)四、Consider the following plot of TCP congestion window size as a function of time.Fill in the blanks as follow:a) The initial value of Threshold at the first transmission round is __12 __.b) The value of Threshold at the 11st transmission round is ___ 8 _.c) The value of Threshold at the 21st transmission round is __ 7 __.d) After the 9th transmission round, segment loss detected by _timeout_.e) After the 19th transmission round, segment loss detected by _3 duplicate ACKs__. f) During __ 5 __ transmission round, the 18th segment is sent.五、For the given topology of the network, use Dijstra ’s shortest path algorithm to compute the shortest path from B to all network nodes. Give a shortest path tree and node B ’s routing table.Answer:0 0 0 Congestion window size Transmission roundN ’D(A),P(A) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F) B5,B 1,B ∞ ∞ ∞ B,C3,C 6,C ∞ 3,C B,C,A4,A 5,A 3,C B,C,A,F4,A 4,F B,C,A,F,D4,F B,C,A,F,D,EDest.Next Top AC B- CC DC EC FC六、Suppose that you send a mail to ****************.cn.Your mailbox is************.cn.The mail includes a excel attachment. Subject is “Problemabout exam ”, What might the header lines (including MIME lines) look like?Answer:From:************.cnTo:****************.cnSubject: Problem about examMIME-version : 1.0 Content-transfer-encoding: base64Content-type: application/MSexcel七、Consider the data D =101110000, that the receiving node receives from thenetwork. The generator G =1001. Use CRC method and compute whether thereis a bit-error. If there is an error, please give the value of the remainder R .1 E D C F 12 2 1 A B八、Now we had known IP address is 203.100.113.80/22,Please compute :1) Network address,2) Broadcast address,3) How many hosts are there in the network? 4) First host IP address,5)Last host IP addressAnswer:1)Network address is 203.100.112.02)Broadcast address is 203.100.115.2553)there are 1022 hosts in the network4)First host IP address is 203.100.112.15)Last host IP address is 203.100.115.254。

大连交通大学《软件工程》考试(试卷)(第一套A卷)

大连交通大学《软件工程》考试(试卷)(第一套A卷)

教研室主任(签字)(签字)box test case generation is:A. the chief programmerB. the back-up programmerC. programmerD. the programming secretary9、Stepwise refinement is a problem solving technique that underlies many softwareengineering techniques. It can be defined as a means to:A. specify the product's design up front in order to minimize integration problemsduring later phasesB. postpone decisions on details until as late as possible in order to be able toconcentrate on the important issuesC. decompose the problem into pieces of equal importanceD. review the project's deliverables such as specification documents and code bystepping through them during review meetings10、A tool that can automatically manage multiple versions is a(n):A. upperCASE toolB. compilerC. configuration management toolD. structure editor11、In software engineering the term quality implies:A. excellenceB. the extent to which the product satisfies its specificationC. there have been no fatal or otherwise catastrophic consequences of its operationD. that comprehensive testing has not revealed the presence of any bugs12、Why should the SQA group be kept under separate management from the developmentteam(s)?A. to increase the employment prospects of the analysts.B. to decrease the cost of managing large teamsC. to facilitate the principle of information hiding that is crucial toobject-oriented systemsD、due to conflicts that may arise as production deadlines approach whilst theproduct still has serious faults.13、The two main design strategies are known as functional design and object-orientateddesign. Which of the following statements is false?A. In an object-orientated design the system state is decentralized and each objectmanages its own state information.B. In functional design the system state is centralized and state information isaccessed by different functions.C. the most appropriate design strategy is selected for each stage of design, thereis no need to adhere to a single approach during the whole design process.D. the same design approach must be used in the design of different system componentsto ensure consistency, especially for large software systems.14、A design is said to be a good design if the components are:A. Strongly coupled and Weakly cohesiveB. Strongly coupled and strongly cohesiveC. Strongly cohesive and weakly coupledD. Weakly cohesive and weakly coupled15、What is/are the major disadvantage(s) of basing the requirementspecification on a prototype model?A. The rapid prototype cannot stand as a legal statement of a contractbetween a developer and a client.B. Creating a working prototype takes more time and effort thanformulating written specifications.C. The users are not able to understand them to the same extent thatthey are able to comprehend written specifications.D. all of these are disadvantages16、Using the structured systems approach for specification and designthe emphasis is on:A. Real-Time systemsB. actionsC. dataD. objects17、Using structured systems analysis, the logic of the processes isdeveloped byA. defining the data stores and data flowsB. data modelingC. process decompositionD. decision trees18、During detailed design ___________ and ___________ are specified.A. algorithms, data structuresB. modules, interconnectionsC. subsystems, interfacesD. architecture, human computer interactions (HCI)19、The underlining technique in Data Flow Analysis is:A. generalizationB. specializationC. stepwise refinementD. encapsulation20、In OOD how can you decide where to locate an action?A. by assigning it to a class or to a client (i.e. program unit) thatsends a message to an object of that classB. on the basis of information hiding. i.e. actions performed on statevariables should be local to that classC. by using responsibility-driven designD. by any of these three methods21、Which UML diagram best emphasizes the chronological order ofmessages?A. class diagramB. sequence diagramC. collaboration diagramD. use case装订线22、As a rule of thumb IF statements should not be nested to a depth greater than:A. 1B. 2C. 3D. 423、Black box testing is based on the:A. design documentB. specification documentD. Software Project Management Plan (SPMP)E. all of these24、A successful test case is one that:A. detects an already identified fault.B. detects a previously undetected fault.C. runs without a fault being detected.D.exhaustively tests every path through a module.25、How many test cases should be prepared for each set when it is specified that an itemmust belong to a given set in the specifications?A. 1B. 2C. 3D. none of the above26、A number of studies have compared strategies for module testing. Which of the followingstatements on their relative merits is false?A. code inspection is at least as effective at detecting faults as glass-box and black-boxtesting.B. professional programmers detected more faults with code reading than black-box andglass-box testing, and the fault detection rate was higher.C. code reading lead to the detection of more interface faults.D. code walkthroughs proved to be the least cost-effective method.27、An advantage of top-down implementation and integration is:A. it is easy to determine where the fault lies when a new module is addedB. major design flaws show up early when the logic modules are coded and testedC. operational modules are implemented after their ancestor logic modulesD. none of these.28、Integration testing should be run by the:A. SQA groupB. programmers who developed the modulesC. analysts who specified the modules' functionalityD. clients29、During which phase of the software life cycle do you first consider maintenance?A. implementationB. testingC. maintenanceD. from the very beginning30、Often the best way of dealing with problems involving the (software) product that arenot emergencies is to:A. fix themB. find a work-roundC. assign them to the least experienced programmersD. blame someone else共 5 页第2 页二、Fill in the blank(each blank 1 point ,total 10point)1.One simple way of looking at the spiral software life-cycle model is asa waterfall model with each phase proceeded by2.A CASE device that provides support for one or two activities withinthe software development process is referred to as a(n)3.A new version of a faulty module is a(n)4. is the extent to which the product meets its constraintswith regard to response time or space requirements.5.If a data structure is passed as an argument, but the called moduleoperates on only some of the individual components of that data structure then they are said to be coupled.6. CRC stands for Class Responsibility .7. At the end of the phase test cases can start to bedrawn up.8. When a change is made to a product to react to changes in the environment,this is an example of maintenance.9.If a maintenance programmer locates a fault and changes it, sointroducing another fault in the product, then this is termed afault.10.The process of starting with the source code and recreating the designdocuments or even the specifications is known as三、Answer the following question.(total 45 point)1、Explain the following noun.(each 3 point ,total 15 point)(1)Software Engineering(2) Cost-benefit Analysis(3) Cohesion装订线(4) Data encapsulation(5) Reuse2、Draw the waterfall model and describe its strengths and weaknesses.(6 point)共 5 页第3 页What is the structure of classical chief programmer team and what arethe two key characters of chief programmer team ? (7 points)5、What is the similarity and difference between walkthrough and inspection?(5 points)6、Determine the cohesion of the following modules,and explain your reasonin brief:(5 points)①Read part number from database and update repair record on maintenance file.②Calculate new trajectory(弹道)and send it to the printer.③Get temperature of furnace.④Open old master file, new master file, transaction file, and print file.⑤print next line, reverse the string of characters comprising the third argument.共5 页第4 页less or equal to 35kg checked for free. The heavy lift )is 6¥/Kg for domestic first class passengers(国¥/Kg for other domestic passengers. The heavy liftThe heavy lift additional for the disabled is half2、A product is to be installed to control n elevators in a building with m floors. The problemconcern the logic required to move elevators between floors according to the following constrains:1) Each elevator has a set of m buttons, one for each floor. These illuminate when pressedand cause the elevator to visit the corresponding floor. The illumination is canceled when the corresponding floor is visited by the elevator.2) Each floor, except the first floor and the top floor, has two buttons, one to requestan up-elevator and one to request a down-elevator. These buttons illuminate when pressed.The illumination is canceled when an elevator visits the floor and then moves in the desired direction.3) When an elevator has no request, it remains at its current floor with its doors closed.Assume that you are in the Object Oriented Analysis phase, please draw the use-case diagram and class diagram for this product.(8 points)共5页第 5 页Software engineering Key Answers (Paper A)一、For each question, there are four choices marked A,B,C,D, choose the best answer.(each 1 point,total 30 point).1.D2.C3.D4.C5.B6.D7.B8.B9.B 10.C11.B 12.D 13.D 14.C 15.A 16.B 17.D 18.A 19.C 20.D21.B 22.C 23.B 24.B 25.B 26.A 27.B 28.A 29.D 30.B评分标准:选对给1分,选错给0分。

2021年大连交通大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷B(有答案)

2021年大连交通大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷B(有答案)

2021年大连交通大学数据科学与大数据技术专业《计算机组成原理》科目期末试卷B(有答案)一、选择题1、下列关于页式虚拟存储器的论述,正确的是()。

A.根据程序的模块性,确定页面大小B.可以将程序放置在页面内的任意位置C.可以从逻辑上极大地扩充内存容量,并且使内存分配方便、利用率高D.将正在运行的程序全部装入内存2、主存按字节编址,地址从0A4000H到0CBFFFH,共有()字节;若用存储容量为32K×8位的存储芯片构成该主存,至少需要()片。

A.80K,2B.96K,2C.160K,5 C.192K,53、对于相同位数(设为N位,且各包含1位符号位)的二进制补码小数和十进制小数,(二进制小数所表示的数的个数)/(十进制小数所能表示的数的个数)为()。

A.(0.2)NB. (0.2)N-1C. (0.02)ND. (0.02)N-14、在浮点机中,()是隐藏的。

A.阶码B.数符C.尾数D.基数5、并行加法器中,每位全和的形成除与本位相加两数数值位有关外,还与()有A.低位数值大小B.低位数的全和C.高位数值大小D.低位数送来的进位6、下列有关总线定时的叙述中,错误的是()。

A.异步通信方式中,全互锁协议最慢B.异步通信方式中,非互锁协议的可靠性最差C.同步通信方式中,同步时钟信号可由各设备提供D.半同步通信方式中,握手信号的采样由同步时钟控制7、总线按连接部件不同可分为()。

A.片内总线、系统总线、通信总线B.数据总线、地址总线、控制总线C.主存总线I/O总线、DMA总线D.ISA总线、VESA总线、PCI总线8、假设基准程序A在某计算机上的运行时间为100s,其中90s为CPU时间,其余为/O 时间。

若CPU速度提高50%,V/O速度不变,则运行基准程序A所耗费的时间是()。

A.55sB.60sC.65 sD.70s9、CPU中的译码器要用()。

A.地址译码人B.指令译码C.数据译码1D.控制信号译码10、指令从流水线开始建立时执行,设指令流水线把一条指令分为取指、分析、执行三部分,且三部分的时间分别是2ns、2ns、Ins,则100条指令全部执行完毕需要()。

大连理工大学智慧树知到“计算机科学与技术”《JavaScript基础教程与应用》网课测试题答案卷3

大连理工大学智慧树知到“计算机科学与技术”《JavaScript基础教程与应用》网课测试题答案卷3

大连理工大学智慧树知到“计算机科学与技术”《JavaScript基础教程与应用》网课测试题答案(图片大小可自由调整)第1卷一.综合考核(共10题)1.Javascript里String对象通过indexOf方法取第一次出现子字符串的字符位置。

()A.正确B.错误2.JavaScript中允许使用预定义的函数,不允许自定义函数。

()A.正确B.错误3.JavaScript能在客户方写硬盘。

()A.正确B.错误4.JavaScript是运行在()的脚本语言。

A.服务器端B.客户端C.在服务器端运行后,结果返回客户端D.在客户端运行后,结果返回服务器端5.Javascript的基本数据类型包括数组。

()A.正确B.错误6.在JavaScript中,定义一个局部变量x,可以()。

A.使用关键字private在函数中定义B.使用关键字private在任何函数之外定义C.使用关键字var在函数中定义D.使用关键字var在任何函数之外定义7.定义JavaScript变量,必须指出变量名和值。

() A.正确B.错误8.JavaScript表达式的类型只取决于运算符,与操作数无关。

()A.正确B.错误9.下列哪一个不是JavaScript运算符?()A.(=)B.(==)C.(&&)D.($#)10.JavaScript中,使文本框获得焦点的方法是()。

A.onSelect()B.focus()C.blur()D.fix()第1卷参考答案一.综合考核1.参考答案:A2.参考答案:B3.参考答案:B4.参考答案:B5.参考答案:B6.参考答案:C7.参考答案:B8.参考答案:B9.参考答案:D10.参考答案:B。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

教研室主任(签字)学院院长(系主任)(签字)大连交通大学试卷2011 ~2012 学年第二学期课程JSP基础与应用(B卷)(R机械08级)一、选择题(本题为单选,共15题,每题2分,总计30分)1、假设B.jsp保存在web服务目录的根目录ROOT中,下列哪种方式是正确访问B.jsp的正确方式:A、http://localhost:8080/B.jspB、http://localhost:8080/ROOT/B.jspC、http://localhost:8080/webapps/B.jspD、http://localhost:8080/webapps/ROOT/B.jsp2、假设B.jsp,它的文件路径如下:%TOMCATHOME%\webapps\MyJSP\B.jsp,在 B.jsp中使用Circle类创建JavaBean对象,Circle类位于red.star包下,那么Circle类的class文件应该如何放置?A、webapps\ MyJSP \red\star\Circle.classB、webapps\MyJSP \classes\ red\star \Circle.classC、webapps\ MyJSP \WEB-INF\red\star\Circle.classD、webapps\MyJSP\WEB-INF\classes\ red\star\Circle.class3、假定当前的Web服务目录名称为girl,那么web.xml部署描述文件应该存放在哪个位置?A、WEB-INF\girl \web.xmlB、girl\WEB-INF\classes \web.xmlC、classes \ girl \web.xmlD、girl\WEB-INF \web.xml4、假设在Web服务目录sun中有一个Servlet类,它在web.xml文件中的配置如下:<servlet><servlet-name> Hello </servlet-name><servlet-class>tom.jiafei.Servlet</servlet-class></servlet><servlet-mapping><servlet-name> Hello </servlet-name><url-pattern>/hello</url-pattern></servlet-mapping>那么在浏览器端访问Hello对象的URL是什么?A、http://localhost:8080/sun/ helloB、http://localhost:8080/sun/ HelloC、http://localhost:8080/ tom/jiafei/ServletD、http://localhost:8080/sun/tom/jiafei/ hello装订线5.下列方法中,response对象调用哪个方法能够动态改变页面的MIME类型?A、setStatus()B、encodeRedirectURL()C、sendRedirect()D、setContentType()6.session对象调用哪个方法可以获取所有对象所对应的关键字,并将关键字放在一个枚举类型的变量中?A、removeAttribute()B、setAttribute() C getAttribute() D、getAttributeNames()7.下列关于page指令用法的描述正确的是()A、page指令作用于整个JSP页面B、必须将其放在JSP文件的开头C、page指令中所有属性可以指定多值D、page指令中的所有属性只能出现一次8.下列对于表达式的描述,错误项为( )A、表达式必须能求值;B、表达式由服务器负责计算;C、在<%= 和%>之间可以插入语句;D、在<%= 和%>之间插入一个表达式。

9.在useBean标记创建Javabean时,scope取什么值时,对应的Javabean有效范围为当前页面?A 、pageB 、requestC 、sessionD 、application10.Application对象由服务器创建,某web服务目录下的application对象,下列说法哪个正确()A、被访问该服务目录的所有用户共享B、被所有用户共享C、每个用户互不相同D、有效范围是整个会话期间11.star.moon.Circle是创建bean的类,下列正确创建session周期bean对象的标记是()。

A、<jsp:useBean id=”circle” type=” star.moon.Circle” scope=” session”/>B、<jsp:useBean id=”circle” class=” star.moon.Circle” scope=” session”/>C、<jsp:useBean name=”circle” type=” star.moon.Circle” scope=” session”/>D、<jsp:useBean name=”circle” class=” star.moon.Circle” scope=” session”/>12.下列关于servlet对象叙述正确的是,()A、servlet对象第一次被请求加载时,服务器初始化servlet对象B、servlet对象第一次被请求加载时,客户端初始化servlet对象C、servlet对象每次被请求加载时,服务器都需要初始化servlet对象D、servlet对象每次被请求加载时,客户端都需要初始化servlet对象13.MVC模式是模型-视图-控制器的简称,下列哪一项适合作为视图()A 、JSP页面B、JavaBeanC 、servlet D、web.xml14.下列关于application对象的方法中哪一个可以删除关键字指定的对象?A、getAttribute(String key)B、getAttributeNames()C、removeAttribute(String key)D、setAttribute(String key,Object obj)15. 假设创建bean的类的一个String类型的属性name,下列哪个方法是设置该属性的正确方法?A、public void SetName(String s )B、void setName(String s )C、public void setName(String s )D、public void setname(String s )考生注意:考试时间120 分钟试卷总分100 分共 4 页第 1 页15分)服务器上修改 ① 目录下的 ② 文服务目录,通过虚拟目录来访问JSPjava 表达式。

指令中,可以被指定为多值的属性为 ⑤ 。

session 对象是否是新的。

java 程序片是否被执bean 的属性值,它们是个常用的内置对象, ⑨ 对象被访问该页面的所有客户使用 ⑩ 方法将游标设置到参担当。

11、 如果Servlet 不重写service 方法,那么应该重写doGet 12、 在JSP 中操作数据库时,Statement 定的方式实现对数据库表中记录查询操作。

13、 查询student 表中的score 字段大于90记录的所有字段内容,对应的SQL语句为:。

三、阅读程序并在对应题号位置写出运行结果。

(本题共5小题,每题3分,总计15分。

)1、查看下列JSP 内容:<%@ page contentType="text/html;charset=GB2312" %> <%@ page isThreadSafe="false" %> <html><body><%! int i=0; %> <% i++;out.print("i="+i); %></body> </html> 该页面被访问2次后运行结果如何?2、查看下列JSP 内容:<%@ page contentType="text/html;charset=GB2312" %> <html> <body><% int i=0;i=i+1; %>i=<%= i++ %><%@ include file="a.jsp " %></body></html>该页面被访问2次后运行结果是什么?订线a.jsp 文件内容为: <br> i=<%=i %> <% i=i+1; %>3.查看下列JSP 程序代码:<%@ page isThreadSafe="false" %> <html><body> <% int i=1;i++; %>i=<%=i++ %></body></html>该页面被访问2次后运行结果如何?4、查看下列JSP 程序代码:<%@ page isThreadSafe="false" %> <html><body><% ! int i=1; %><% i++ ; %><%= 2*i+1 %><jsp:forward page="b.jsp"/><br><%= i %></body></html>该页面被访问2次后运行结果如何?5、查看下列JSP 程序代码:<%@ page isThreadSafe="false" %> <html> <body> <% int i=1; i++; %> <jsp:include page="c.jsp"/> i=<%= i++ %> </body></html>该页面被访问2次后运行结果如何?四、补全程序(本题共2小题,每空2分,20个空,总计40分 )1、编写两个JSP 页面,a.jsp 和b.jsp ,a.jsp 页面提供一个表单,用户可以通过表单输入梯形的上底、下底和高提交给b.jsp 页面,b.jsp 页面调用一个bean 去完成计算梯形面积任务。

相关文档
最新文档