2017上半年软件设计师考试上午真题(三)

希赛 整理了2017上半年软件设计师考试上午真题,以下为第三部分,供大家参考学习。

试题51-52

若事务T1对数据D1加了共享锁,事务T2、T3分别对数据D2、D3加了排它锁,则事务T1对数据();事务T2对数据()

A.D2、D3加排它锁都成功

B.D2、D3加共享锁都成功

C.D2加共享锁成功,D3加排它锁失败

D.D2、D3加排它锁和共享锁都失败

A.D1、D3加共享锁都失败

B.D1、D3加共享锁都成功

C.D1加共享锁成功,D3如排它锁失败

D.D1加排它锁成功,D3加共享锁失败

试题53

假设关系R<U,F>,U={A1,A2,A3},F={A1A3→A2,A1A2→A3},则关系R的各候选关键字中必定含有属性()。

A.A1

B.A2

C.A3

D.A2 A3

试题54-56

在某企业的工程项目管理系统的数据库中供应商关系Supp、项目关系Proj和零件关系Part的E-R模型和关系模式如下:

Supp(供应商 ,供应商名,地址,电话)

Proj(项目 ,项目名,负责人,电话)

Part(零件 ,零件名)

其中,每个供应商可以为多个项目供应多种零件,每个项目可由多个供应商供应多种零件。SP P需要生成一个独立的关系模式,其联系类型为()

给定关系模式SP P(供应商 ,项目 ,零件 ,数量)查询至少供应了3个项目(包含3项)的供应商,输出其供应商 和供应零件数量的总和,并按供应商 降序排列。

SELECT供应商 ,SUM(数量)FROM()

GROUP BY供应商

()

ORDER BY供应商 DESC;

A.*:*:*

B.1:*:*

C.1:1:*

D.1:1:1

A.Supp

B.Proj

C.Part

D.SP P

A.HAVING COUNT(项目 )>2

B.WHERE COUNT(项目 )>2

C.HAVING COUNT(DISTINCT(项目 ))>2

D.WHERE COUNT(DISTINCT(项目 ))>3

试题57

以下关于字符串的叙述中,正确的是()

A.包含任意个空格字符的字符串称为空串

B.字符串不是线性数据结构

C.字符串的长度是指串中所含字符的个数

D.字符串的长度是指串中所含非空格字符的个数

试题58

已知栈S初始为空,用I表示入栈、O表示出栈,若入栈序列为a1a2a3a4a5,则通过栈S得到出栈序列a2a4a5a3a1的合法操作序列()

A.IIOIIOIOOO

B.IOIOIOIOIO

C.IOOIIOIOIO

D.IIOOIOIOOO

试题59

某二叉树的先序遍历序列为ABCDEF,中序遍历序列为BADCFE,则该二叉树的高度(即层数)为()

A.3

B.4

C.5

D.6

试题60

对于n个元素的关键宇序列{k1,k2,…kn},当且仅当满足关系ki≤k2i且ki≤k2i+1{i=1.2…[n/2]}时称其为小根堆(小顶堆)。以下序列中,()不是小根堆。

A.16,25,40,55,30,50,45

B.16,40,25,50,45,30,55

C.16,25,39.,41,45,43,50

D.16,40,25,53,39,55,45

试题61

在12个互异元素构成的有序数组a[1..12]中进行二分查找(即折半查找,向下取整),若待查找的元素正好等于a[9][,则在此过程中,依次与数组中的()比较后,查找成功结束。

A.a[6]、a[7]、a[8]、a[9]

B.a[6]、a[9]

C.a[6]、a[7]、a[9]

D.a[6]、a[8]、a[9]

试题62-65

某汽车加工工厂有两条装配线L1和L2,每条装配线的工位数均为n(Sij,i=1或2,j=1,2,…,n),两条装配线对应的工位完成同样的加工工作,但是所需要的时间可能不同(aij,i=1或2,j=1,2,…,n)。汽车底盘开始到进入两条装配线的时间(e1,e2)以及装配后到结束的时间(X1X2)也可能不相同。从一个工位加工后流到下一个工位需要迁移时间(tij,i=1或2,j=2,…n)。现在要以最快的时间完成一辆汽车的装配,求最优的装配路线。

分析该问题,发现问题具有最优子结构。以L1为例,除了第一个工位之外,经过第j个工位的最短时间包含了经过L1的第j-1个工位的最短时间或者经过L2的第j-1个工位的最短时间,如式(1)。装配后到结束的最短时间包含离开L1的最短时间或者离开L2的最短时间如式(2)。

由于在求解经过L1和L2的第j个工位的最短时间均包含了经过L1的第j-1个工位的最短时间或者经过L2的第j-1个工位的最短时间,该问题具有重复子问题的性质,故采用迭代方法求解。

该问题采用的算法设计策略是(),算法的时间复杂度为()

以下是一个装配调度实例,其最短的装配时间为(),装配路线为()

A.分治

B.动态规划

C.贪心

D.回溯

A.21

B.23

C.20

D.26

A.S11→S12→S13

B.S11→S22→S13

C.S21→S12→S23

D.S21→S22→S23

试题66

在浏览器地址栏输入一个正确的 址后,本地主机将首先在()查询该 址对应的IP地址。

A.本地DNS缓存

B.本机hosts文件

C.本地DNS服务器

D.根域名服务器

试题67

下面关于Linux目录的描述中,正确的是()

A.Linux只有一个根目录,用”/root”表示

B.Linux中有多个根目录,用”/”加相应目录名称表示

C.Linux中只有一个根目录,用”/”表示

D.Linux中有多个根目录,用相应目录名称表示

试题68

以下关于TCP/IP协议栈中协议和层次的对应关系正确的是()

试题69

在异步通信中,每个字符包含1位起始位、7位数据位和2位终止位,若每秒钟传送500个字符,则有效数据速率为()

A.500b/s

B.700b/s

C.3500b/s

D.5000b/s

试题70

以下路由策略中,依据 络信息经常更新路由的是()

A.静态路由

B.洪泛式

C.随机路由

D.自适应路由

试题71-75

The beauty of software is in its function,in its internal structure,and in the way in which it is created by a team.To a user,a program with just the right features presented through an intuitive and( )interface is beautiful.To a software designer,an internal structure that is partitioned in a simple and intuitive manner,and that minimizes internal coupling is beautiful.To developers and managers,a motivated team of developers making significant progress every week,and producing defect-free code,is beautiful.There is beauty on all these levels.

our world needs software–lots of software.Fifty years ago software was something that ran in a few big and expensive machines.Thirty years ago it was something that ran in most companies and industrial settings.Now there is software running in our cell phones,watches,appliances,automobiles,toys,and tools.And need for new and better software never( ).As our civilization grows and expands,as developing nations build their infrastructures,as developed nations strive to achieve ever greater efficiencies,the need for more and more Software()to increase.It would be a great shame if,in all that software,there was no beauty.

We know that software can be ugly.We know that it can be hard to use,unreliable,and carelessly structured.We know that there are software systems whose tangled and careless internal structures make them expensive and difficult to change.We know that there are software systems that present their features through an awkward and cumbersome interface.We know that there are software systems that crash and misbehave.These are( )systems.Unfortunately,as a profession,software developers tend to create more ugly systems than beautiful ones.

There is a secret that the best software developers know.Beauty is cheaper than ugliness.Beauty is faster than ugliness.A beautiful software system can be built and maintained in less time,and for less money,than an ugly one.Novice software developers don’t.understand this.They think that they have to do everything fast and quick.They think that beauty is( ).No!By doing things fast and quick,they make messes that make the software stiff,and hard to understand,Beautiful systems e flexible and easy to understand.Building them and maintaining them is a joy.It is ugliness that is impractical.Ugliness will slow you down and make your software expensive and brittle.Beautiful systems cost the least build and maintain,and are delivered soonest.

A.Simple

B.Hard

C.Complex

D.Duplicated

A.happens

B.exists

C.stops

D.starts

A.starts

B.continues

C.appears

D.stops

A.practical

B.useful

C.beautiful

D.ugly

A.impractical

B.perfect

C.time-wasting

D.practical

原文标题:2017上半年软件设计师考试上午真题汇总

原文链接:http://www.educity.cn/rk/1787683.html

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2017年5月8日
下一篇 2017年5月8日

相关推荐