以下是某C++程序,用来判定用户口令,请仔细阅读程序并完成要求。 //**********************************************************// // 口令检验程序 // // 文件名:password_check. cpp // //**********************************************************// #include<iostream. h> #include<string. h> //**********************************************************// // 主函数 // //**********************************************************// void main(void) { char password[128]={’\0/}; cout<<“请输入您的口令:"; cout. flush(); while(true){ cin. getline(password,128,’\n’); if(strlen(password)<6) //口令长度少于6位 { cout<<"您的用户口令少于6个字符!"<<endl; cout<<"请重新输入:"; cout. flush(); }else{ bool capital=false; //检验是否有大写字母 bool lowercase=false; //检验是否有小写字母 bool digit=false; //检验是否有数字 for(unsigned int i=0;i<strlen(password);i++){ if(password[i]>=’A’&&password[i]<=’Z’) capital=true; if(passwordEi]>="a"&&password[i]<=’Z’) lowercase=true; if(password[i]>=’0’&&password[i]<=’9’) digit=true; } //判断用户输入的口令中缺少哪中字符 if(capital){ cout<<"您的用户口令中没有大写字母!"<<endl; cout<<"请重新输入:"; }else if(lowercase){ cout<<"您的用户口令中没有小写字母!"<<endl; cout<<"请重新输入:"; }else if(digit){ cout<<"您的用户口令中没有数字!"<<endl; cout<<"请重新输入:"; }else{ cout<<"您的口令满足要求!"<<endl; break; } } } } 设计一组测试用例,使该程序所有函数的语句覆盖率和分支覆盖率均能达到100%。如果认为该程序的语句或分支覆盖率无法达到100%,需说明理由。
查看答案
“十一五”期间全面启动______、______和______三个重点新城建设。P5
In Zurich, a leading canton in the Swiss Confederation, it has been proposed to teach one foreign language—English—in primary schools. This would represent a change (21) Zurich’s elementary school kids now study English and French. Voters will decide whether French will be (22) Some educators (23) that two foreign languages are too much for kids. Supporters of one foreign language believe that kids fail to reach strong (24) in German, the mother tongue for schoolchildren in Zurich. In fact, Zurich kids speak Swiss German, which is (25) an oral language. In school they have to learn standard German, which (26) is a foreign language. (27) you add them all together Zurich kids are learning four languages. All of Switzerland will watch what Zurich voters decide because Zurich is an influential canton and others may (28) . Yet some German-speaking cantons have already decided to (29) plans to reduce the number of foreign languages. (30) what happens, Swiss kids will be fluent in more than one language which is a definite asset in today’s (31) economy. It is also a definite asset in learning other subjects. Studies (32) in American universities have found that kids who study in duallanguage schools outperform their (33) who are taught in English only. Apparently, kids educated in two languages develop a mental (34) that monolingual kids lack. Perhaps four languages are too many in elementary schools, but two is not (35) at all.
A. unnecessary
B. unpleasant
C. unrealistic
D. undesirable
北京旅游业成为北京______产业中心的支柱产业,成为______新的增长点。P2