- 1、本文档共14页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
安徽工业大学软件工程实验报告资料
《软件工程》实验报告
姓 名:胡成柱
学 号:129074044
班 级:计算机科学与技术122
指导老师:周兵
日 期:2015年05月
实验目的
1.能按照软件工程的思想,采用面向过程的方法开发出一个小型软件系统。
2.在软件系统开发过程中,能综合利用一门编程语言和软件工程等多门课程的知识。
3.培养良好的软件开发习惯,了解软件企业文化。
4.掌握结构化数据流分析技术。
5.掌握结构化程序设计的基本概念与技术,并且养成良好的编码风格。
6.掌握单元测试的一般步骤及技术。
7.掌握集成测试的一般步骤和技术。
实验内容
软件需求分析
①、功能需求分析
·输入一个年份(1-3000),然后显示12个月的月历
·能解决闰年和平年问题
·能输出显示结果
②、运行需求分析
· 操作系统: Windows9x, Windows2000, Windows XP及更高版本
③、数据流图
软件结构图:
软件设计与编码
#include stdio.h
#include ctype.h
#include stdlib.h
#include math.h
#define firstdayof1 1
/* 定义第一年的第一天, 星期日=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);
void output(struct info);
void printhead(struct info );
void printmonth(struct info);
struct info setinit(int);
struct info setmonthinfo(struct info );
/* 这个作用是判断年, 如果是闰年, return 1, 否则
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(y1 || y 3000)
{
printf(\n输入错误!。\n\n);
y=0;
}
}while(y1);
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];
int i, y;
y=-1;
printf(请输入年份(1-3000):);
for(i=0;i80;++i)
{
s[i]=getchar();
if(s[i]==27)
exit(0);
if(s[i]==10)
break;
}
for(i
您可能关注的文档
- 安全员考试基础知识典型练习题资料.doc
- 安全员考试案例题资料.ppt
- 安全在我心中主题班会[]资料.ppt
- 安全在我心中主题班会资料.ppt
- 安全培训与企业发展资料.ppt
- 安全培训教材防范诈骗资料.pptx
- 安全工作总结及安全工作计划(定)资料.doc
- 安全工作把握趋势资料.ppt
- 安全工作法资料.ppt
- 安全工程专业实践教学大纲汇编修改资料.doc
- 中国国家标准 GB/T 20867.1-2024机器人 安全要求应用规范 第1部分:工业机器人.pdf
- 《GB/T 20867.1-2024机器人 安全要求应用规范 第1部分:工业机器人》.pdf
- 《GB/T 23423-2024飞机主舱集装货物装载机》.pdf
- GB/T 23423-2024飞机主舱集装货物装载机.pdf
- 中国国家标准 GB/T 23423-2024飞机主舱集装货物装载机.pdf
- 《GB/T 4706.114-2024家用和类似用途电器的安全 第114部分:饮用水处理装置的特殊要求》.pdf
- 中国国家标准 GB/T 4706.114-2024家用和类似用途电器的安全 第114部分:饮用水处理装置的特殊要求.pdf
- GB/T 4706.114-2024家用和类似用途电器的安全 第114部分:饮用水处理装置的特殊要求.pdf
- GB/T 4706.120-2024家用和类似用途电器的安全 第120部分:紫外线辐射水处理器具的特殊要求.pdf
- 中国国家标准 GB/T 4706.120-2024家用和类似用途电器的安全 第120部分:紫外线辐射水处理器具的特殊要求.pdf
最近下载
- 新动物防疫管理制度.doc
- 电工培训课件PPT(共-95张).ppt
- 第1课 社会主义在中国的确立与探索【中职专用】-【名师课堂】高一思想政治《中国特色社会主义》备课精品课件(高教版2023·基础模块).pptx
- 质量控制实验室GMP指南1300问完整版.pdf VIP
- 做情绪的主人 一 认识情绪 课件.ppt
- 医学影像学-消化系统的影像学诊断.ppt
- 旅游界app项目创业计划书.pptx VIP
- 第1课 铰链四杆机构的组成及分类公开课教案教学设计课件资料.pptx VIP
- 提高护士输液时PDA扫描率品管圈护理课件.pptx
- 地球与地球仪课件 2024-2025学年人教版地理七年级上册.pptx VIP
文档评论(0)