1、实验 3 墨盒测试法等价类划分法实验目的:1.掌握等价类划分的方法2.掌握按等价类测试用例实验内容:1、请用等价类划分法为三角形问题划分等价类,并设计相应的测试用例,测试下面三角形问题程序,找出缺陷并改正。#include “iostream.h“void main()int a,b,c;coutabc;if(a=100)cout=100)cout=100)coutc|a+cb|b+ca)coutbif(a=100)cout=100)cout=100)coutc(2)a+cb(3)b+ca(4)a0(5)b0(6)c0(11)a+bb void NextDate(int year,int mo
2、nth,int day); void main() int year=0,month=0,day=0; NextDate(year,month,day); void NextDate(int year,int month,int day) coutyear; while(!(year=1811 coutmonth; while (month12|monthmonth; coutday; while (day31|dayday; if(year%4=0 i=day-29; while(month=2 if(month=2 day=1; else day+; else day+; /月底计算; s
3、witch(month) case 1: case 3: case 5: case 7: case 8: case 10: if (day=32) month+; day=1; cout“明天是:“year/month/dayendl; break; case 2: if(day=29) month=3; day=1; break; case 4: case 6: case 9: case 11: if(day=31) month+; day=1; cout“明天是:“year/month/dayendl; break; case 12: if(day=32) year+; month=1; day=1; cout“明天是:“year/month/dayendl; break; cout“明天是:“year/month/dayendl;