问题 单项选择题

关于逻辑覆盖,说法错误的是______。

A.DDP覆盖是判定覆盖的一个变体

B.满足条件覆盖一定也满足判定覆盖

C.指令块覆盖属于语句覆盖

D.若判定覆盖率达100%,则语句覆盖率一定也是100%

答案

参考答案:B

解析: 条件覆盖是指设计若干个测试用例,运行被测程序,使得程序中每个判定的每个条件的可能取值至少评价一次。而判定覆盖是设计测试用例,使得程序中每个判定的取真分支和取假分支至少评价一次。二者没有必然的联系,故满足条件覆盖的未必会满足判定覆盖,选项B错误。而满足判定覆盖一定会满足语句覆盖是容易理解的,因为每个判定的取真分支和取假分支都至少评价一次.必然预示着每个可执行语句至少评价了一次,即满足了语句覆盖。另外指令块覆盖是语句覆盖的一个变体.而DDP覆盖(判定路径覆盖)是判定覆盖的一个变体。

单项选择题

It’s seven weeks into the new year. Do you know where your resolution is If you’re like millions of Americans, you probably vowed to lose weight, quit smoking and drink less in the new year. You kicked off January with a commitment to long-term well-being--until you came face-to-face with a cheeseburger. You spent a bundle on a shiny new gym pass. Turns out, it wasn’t reason enough for you to actually use the gym.

People can make poor decisions when it comes to health--despite their best intentions. It’s not easy abiding by wholesome choices (giving up French fries) when the consequences of not doing so (heart disease) seem so far in the future. Most people are bad at judging their health risks: smokers generally know cigarettes cause cancer, but they also tend to believe they’re less likely than other smokers to get it. And as any snack-loving dieter can attest, people can be comically inept at predicting their future .behavior. You swear you will eat just one potato chip but don’t stop until the bag is empty.

So, what does it take to motivate people to stick to the path set by their conscious brain How can good choices be made to seem more appealing than bad ones The problem stumps doctors, public-health officials and weight-loss experts, but one solution may spring from an unlikely source. Meet your new personal trainer: your boss.

American businesses have a particular interest in personal health, since worker illness costs them billions each year in insurance claims, sick days and high staff turnover. A 2008 survey of major US employers found that 64% consider their employees’ poor health decisions a serious barrier to affordable insurance coverage. Now some companies are tackling the motivation problem head on, using tactics drawn from behavioral psychology to nudge their employees to get healthy.

"It’s a bit paradoxical that employers need to provide incentives for people to improve their own health," says Michael Follick, a behavioral psychologist at Brown University and president of the consultancy Abacus Employer Health Solutions.

Paradoxical, maybe, but effective. Consider Amica Mutual Insurance, based in Rhode Island. Arnica seemed to be doing everything right: it boasts an on-site fitness center at its headquarters. It pays toward Weight Watchers and smoking-cessation help, gives gift cards to reward proper prenatal care and offers free flu shots each year. Still, in the mid-2000s, about 7% of the company’s insured population, including roughly 3 100 employees and their dependents, had diabetes. "We manage risk. That’s our core business," says Scott Boyd, Amica’s director of compensation and benefits. But diabetes-related claims from Arnica employees had doubled in four years. "We thought, OK," Boyd says now, "we have to manage these high-risk groups a little better.

Which of the following is TRUE according to the text()

A. If you want to keep healthy, you have to meet your personal trainer

B. The diabetes-related claims from Arnica employees have been increased

C. The American business doesn’t do anything concerned with personal health

D. Abiding by healthy choices is facile

单项选择题