首页 软件工程实验报告

软件工程实验报告

举报
开通vip

软件工程实验报告软件工程实验报告 姓 名: 学 号: 班 级: 指导老师:周兵 日 期:2013年05月 1 一( 实验目的 1(能按照软件工程的思想,采用面向过程的方法开发出一个小型软件系统。 2(在软件系统开发过程中,能综合利用一门编程语言和软件工程等多门课程的知识。 3(培养良好的软件开发习惯,了解软件企业文化。 4(掌握结构化数据流分析技术。 5(掌握结构化程序设计的基本概念与技术,并且养成良好的编码风格。 6(掌握单元测试的一般步骤及技术。 7(掌握集成测试的一般步骤和技术。 二( 实验内容...

软件工程实验报告
软件工程实验 报告 软件系统测试报告下载sgs报告如何下载关于路面塌陷情况报告535n,sgs报告怎么下载竣工报告下载 姓 名: 学 号: 班 级: 指导老师:周兵 日 期:2013年05月 1 一( 实验目的 1(能按照软件工程的思想,采用面向过程的方法开发出一个小型软件系统。 2(在软件系统开发过程中,能综合利用一门编程语言和软件工程等多门课程的知识。 3(培养良好的软件开发习惯,了解软件企业文化。 4(掌握结构化数据流分析技术。 5(掌握结构化程序 设计 领导形象设计圆作业设计ao工艺污水处理厂设计附属工程施工组织设计清扫机器人结构设计 的基本概念与技术,并且养成良好的编码风格。 6(掌握单元测试的一般步骤及技术。 7(掌握集成测试的一般步骤和技术。 二( 实验内容 1( 软件需求分析 ?、功能需求分析 ?输入一个年份(1-3000),然后显示12个月的月历 ?能解决闰年和平年问题 ?能输出显示结果 ?、运行需求分析 ? 操作系统: Windows9x, Windows2000, Windows XP及更高版本 ?、数据流图 确定 润年 是否润年 年份 年份 年份 开始信息 开始信息 检查 计算1显示显示输入 月1日 一月 …… 二月 年份 非法 任意键 显示表头 显示十二月 任意键 2 软件结构图: main checkinput() setinit() output() inputyear() isleap() printhead() printmonth() setinfo() 2( 软件设计与编码 #include #include #include #include #define firstdayof1 1 /* define the first day of first year. 星期日=7 */ #define gap " " /* set gap between numbers of dates */ #define dent " " /* set right margin. */ struct info { int month; int firstdayofmonth; int daysofmonth; int leap; }monthinfo; int checkinput(void); int inputyear(void); int isleap(int y); 3 void output(struct info); void printhead(struct info ); void printmonth(struct info); struct info setinit(int); struct info setmonthinfo(struct info ); /* This fuction is to accept year, if it is leap year, it return 1, otherwise return 0 */ int isleap(int y) { return ((y%4==0 && y%100!=0) || y%400==0); } /* This module is to accept inputyear() and check if it is correct. if it is correct it return int year, otherwise ask user reenter */ int checkinput(void) { int y; do{ y=inputyear(); if(y<1 || y >3000) { printf("\n输入错误~。\n\n"); y=0; } }while(y<1); return y; } /* This function is to accept the input year, if it is the integer, it returns it, otherwise it return -1 */ int inputyear(void) { char s[80]; 4 int i, y; y=-1; printf("请输入年份(1-3000):"); for(i=0;i<80;++i) { s[i]=getchar(); if(s[i]==27) exit(0); if(s[i]==10) break; } for(i=0;i<80;++i) { if(s[i]==10) break; else if(!isdigit(s[i])) return y; } y=atoi(s); return y; } /*This module is to accept monthinfo, and print the whole year calender. */ void output(struct info monthinfo) { char ch; do{ printhead(monthinfo); printmonth(monthinfo); printf("按任意键显视下一月, 按Esc键退出. \n"); ch=getchar(); if(ch==27) exit(0); monthinfo=setmonthinfo(monthinfo); }while(monthinfo.month<13); } /* This module is to accept monthinfo, amd print monthly head like"一 月" 5 */ void printhead(struct info monthinfo) { char *ss; printf("%s",dent); switch(monthinfo.month) { case 1: ss="一 月"; break; case 2: ss="二 月"; break; case 3: ss="三 月"; break; case 4: ss="四 月"; break; case 5: ss="五 月"; break; case 6: ss="六 月"; break; case 7: ss="七 月"; break; case 8: ss="八 月"; break; case 9: ss="九 月"; break; case 10: ss="十 月"; break; case 11: ss="十一 月"; break; case 12: ss="十二 月"; } printf(" %s%s%s%s\n\n",gap,gap,gap,ss); } /* This module is to accept monthinfo, and print the numbered dates of the month. */ 6 void printmonth(struct info monthinfo) { int i,j,k; printf("%s",dent); printf("一%s二%s三%s四%s五%s六%s日 \n\n",gap,gap,gap,gap,gap,gap); printf("%s",dent); for(i=1;i7) { k=k-7; printf("\n\n%s",dent); }; k=k+1; printf("%2d%s",j,gap); } printf("\n\n"); } /* This module is to accept the monthinfo, and set the monthinfo of next month. */ struct info setmonthinfo(struct info monthinfo) { int m; monthinfo.firstdayofmonth= (monthinfo.firstdayofmonth+ \ monthinfo.daysofmonth-1)%7+1; monthinfo.month=monthinfo.month+1; monthinfo.daysofmonth=30; m=monthinfo.month; if(m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m ==12) monthinfo.daysofmonth=31; 7 if(m==2) { if(monthinfo.leap) monthinfo.daysofmonth = 29; else monthinfo.daysofmonth = 28; } return monthinfo; } /* This module is to initialize the monthinfo. */ struct info setinit(int year) { int i,days,total; struct info monthinfo; monthinfo.month=1; monthinfo.firstdayofmonth=firstdayof1; for(i=1;i 总结 初级经济法重点总结下载党员个人总结TXt高中句型全总结.doc高中句型全总结.doc理论力学知识点总结pdf 1( 实验内容总结 实验时按照步骤进行,自己写出主函数,定义结构体,并没有出现什么问 题。对以前学习的C语言有了更好的利用。 2( 心得体会与建议 对于这次实验,由于这门课是双语教学,英语不是很好的我开始理解有一定的难度,经过一定的努力才慢慢入门。经过对实验的研究,我按照软件工程的思想,把理论应用到了实践当中。采用面向过程的方法开发出了一个万年历的小程序。培养了良好的软件开发习惯,了解了一点软件的企业文化。掌握了一定的结构化数据流分析技术。了解了一定的结构化设计的基本概念与技术,对于以前学习的C语言知识有了更深的了解和更好的应用。对子函数的应用更得心应手。总之,这次实验让我受益匪浅。 12
本文档为【软件工程实验报告】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_882336
暂无简介~
格式:doc
大小:71KB
软件:Word
页数:13
分类:互联网
上传时间:2017-09-28
浏览量:49