资源描述:
《西安电子科技大学《软件工程》作业》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、附加题:1、对下列子程序进行调试:procedureexample(y,z:real;varx:real)beginif(y>1)and(z=0)thenx:=x/y;if(y=2)or(x=l)thenx:=x+l;end.该子程序接受x,y,z的值,并将计算结果x的值返回给调用程序。答题要求:(1)画出流程图。(2)用白盒法设计测试用例,并写出它所满足的是何种覆盖标准、预期结果以及路径。答:(1)流程图(2)用白盒法中条件组合覆盖设计测试用例:①y=2,z=0,x=4;②y=2,z=1,x=1;③y=1,z=0,x=2;④y=1,z=1,x=1.2、某报表处理系统要求用户输
2、入处理报表的日期,日期限制在2003年1月至2008年12月,即系统只能对该段期间内的报表进行处理,如日期不在此范围内,则显示输入错误信息。系统日期规定由年、月的6位数字字符组成,前四位代表年,后两位代表月。现要求用黑盒测试法中的边界值法写出测试用例。答:输入条件测试用例说明测试数据报表日期的1个数字字符5类型及长度5个数字字符200357个数字字符2003005有1个非数字字符2003.5全部是非数字字符MAY---6个数字字符200305日期范围在有效范围200301边界上选取200812数据200300developmentinordertoprotectahostofa
3、ttractionsandhistoricalsites,aswellastomaintaintheeconomicvitalityofthedowntownarea.Figure5.1-5figure5.1.4Washingtonmasstransitnetworktosupportimplementationofeffectivetransportdemandmanagementpoliciestoreduceurbantrafficcongestionandpublictransportprioritywasintheearly1960ofthe20thcenturyby
4、theplannersfirstproposedinParis,France,andinEuropeandothermajorcitiestooperatehasbeentheformationoftherichcontentsystem.Publictransportpriorityconsistsoftwoaspects:oneisonthebustohelp....5.1-7Parkandridesystems5.1.5typicalcaseHongKong-JapanSapporo,SapporoisaJapanHokkaidocentralpartsofcities,
5、Japan'sfifthlargestcity.Areaof1121km2inthecity,apopulationof1.921million.InadditionistheadministrativecenterofHokkaido,SapporoisHokkaido'sindustrialandcommercialcenter,in1972,hostedthe11thWinterOlympicGames.3JRSappororailtransitline3metroand3tramlines,Sapporointheurbandevelopmentprocesscombi
6、nedwithCenterofconstructionofsubwayconstructionandresidentialdevelopment,andsupportthedevelopmentoftheregion.Priorto1971,Sapporo,JapanHokkaidolocalCentreintheurbandevelopmentprocess,inresponsetotherapidgrowthofthecitycentretrafficdemand,buildingtrams.1981yearsagoforholdingthewinterOlympicGam
7、esasanopportunitytostartbuildingconnectedtothevenueandthecitycentre200813月份范围月份为1月200301月份为12月200312月份<1200300月份>122003133、对以下程序进行测试:PROCEDUREEX(A,B:REAL;VARX:REAL);BEGINIF(A=3)OR(B>1)THENX:=A×BIF(A>2)AND(B=0)THENX:=A-3END先画出程序流程图。再按不同逻辑覆盖法设计一种(写出名