问题 填空题

阅读下列说明和C++代码,将应填入 (n) 处的字句写在对应栏内。

[说明]

已知某企业的采购审批是分级进行的,即根据采购金额的不同由不同层次的主管人员来审批,主任可以审批5万元以下(不包括5万元)的采购单,副董事长可以审批5万元至10万元(不包括10万元)的采购单,董事长可以审批10万元至50万元(不包括50万元)的采购单,50万元及以上的采购单就需要开会讨论决定。

采用责任链设计模式(Chain of Responsibility)对上述过程进行设计后得到的类图如图18-9所示。

[C++代码]

#include<string>

#include<iostream>

using namespace std;

class PurchaseRequest

public:

double Amount; //采购的金额

int Number; //采购单编号

string Purpose; //采购目的

class Approver //审批者类

public:

Approver()(successor=NULL;

virtual void ProcessRequest(PurchaseRequest aRequest)

if(successor!= NULL)(successor-> (1)

void SetSuccessor(Approver *aSucceSSsor)successor=aSuccesssor;

private:

(2) successor;

class Congress:public Approver

public:

void ProcessRequest(PurchaseRequeSt aRequest)

if(aRequest.Amount>=500000)/*决定是否审批的代码省略*/

else (3) ProceSsRequest(aRequest);

class Director:public Approver

publlc:

void ProcessRequest(PurchaseRequest aRequest) /*此处代码省略*/

class President:public Approver

public:

void ProcessRequest(PurchaseRequest aRequest)/*此处代码省略*/

class VicePresident:public Approver

public:

void ProcessRequest(PurchaseRequest aRequest)/*此处代码省略*/

void msin()

Congress Meeting;VicePresident Sam;Director Larry;President Tammy;

//构造责任链

Meeting.SetSuccessor(NULL);Sam.SetSuccessor( (4) );

Tammy.SetSuccessor( (5) );Larry.SetSuccessot( (6) );

PurchaseRequest aRequest; //构造采购审批请求

cin>>aRequest.Amount; //输入采购请求的金额

(7) .ProcessRequest(aRequest);//开始审批

return;

(3)处填()。

答案

参考答案:Approver::

单项选择题
填空题

Less education, income linked to obesity in women, not men


Women who are better educated and live in households that are middle-income or above are less likely to be obese than women who are less educated and live in the lowest income households, new government research shows.
Among men, there is not a statistically significant (26) in obesity based on income and very (27) difference based on education, the data show.
(28) , about one in three U.S. adults-almost 73 million people-are obese, which is (29) 30 or more pounds over a (30) weight. Extra weight raises the (31) of diabetes, heart disease, some types of cancer and other (32) .
"There is a relationship between obesity and income, but it’s not a (33) story," says Cynthia Ogden, an epidemiologist with the National Center for Health Statistics, part of the Centers for Disease Control and Prevention.
"When looking at these two (34) of socioeconomic status-income and education-their (35) is greater on women than men," she says.
Jennifer Lovejoy, president of the Obesity Society, says that (36) -income women may be more likely to become obese because of environmental (37) such as lack of access to safe places to do physical activity and easy access to fast food.
Among the findings:
·29% of women who live in households with an annual income of $77,000 or more for a family of four are obese in opposition (38) 42% of women who live in households with an annual income below $29,000 for a family of four.
·23% of women with a college degree are obese, significantly less than the 42% of women with (39) than a high school education.
·33% of men who live in households with an annual income of $77,000 or more for a family of four are obese, (40) 29% of men who live in households with an annual income below $29,000 for a family of four are obese. This difference is not considered statistically (41) .
The analysis is based on (42) from the National Health and Nutrition Examination Survey, which is considered the gold (43) for evaluating obesity because it is a(an) (44) survey of people whose weight and height are actually (45) rather than being self-reported.

A. onB. toC. from D. at