为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99

2017-10-21 50页 doc 330KB 12阅读

用户头像

is_833902

暂无简介

举报
【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99 本科生毕业设计(论文) 摘 要 酒店物资管理系统的开发目的是为了创造一个功能全面,易于用户操作使用的管理系统。通过对物资的计划管理,可以完成一些计划的事前存根,与实际形成对比,避免采购的盲目性。出入库管理可以方便的查询库中的物资信息。资金管理可以保障酒店内资金的划分和资金的正常流动。物资分析报表和资金汇总报表可以方便的统计物资与资金的总体状况。系统的特点是投资少,功能强,效率高,操作简单。 论文共分为八章。第一章为前言部分,介绍了系统的概况及应用领域。第二...
【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99
【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99 本科生毕业设计(论文) 摘 要 酒店物资管理系统的开发目的是为了创造一个功能全面,易于用户操作使用的管理系统。通过对物资的计划管理,可以完成一些计划的事前存根,与实际形成对比,避免采购的盲目性。出入库管理可以方便的查询库中的物资信息。资金管理可以保障酒店内资金的划分和资金的正常流动。物资分析报和资金汇总报表可以方便的统计物资与资金的总体状况。系统的特点是投资少,功能强,效率高,操作简单。 论文共分为八章。第一章为前言部分,介绍了系统的概况及应用领域。第二、三章主要介绍了系统需求分析,对系统进行了经济可行性和技术可行性分析。第四、五章分别介绍了系统设计和系统实现。系统设计包括系统总体设计和逻辑结构设计。在实现方面主要阐述了在开发过程中出现的问题及相应的解决方案。第六、七章是系统测试部分,系统测试是对系统中的各项功能进行具体测试。第八章为部分。 关键词:酒店物资管理系统; 出入库管理; 资金管理 I 本科生毕业设计(论文) Abstract The development purpose of the Administrative system of hotel goods and materials is for creating a administrative system which has overall function and is easy to operate .Through the planned management of the goods and materials, users can finish the counter foil in advance of some plans and can compare to the former things in order to avoid the blindness purchased. Come in and go out storehouse management can convenient inquiry goods and materials information of storehouse. The fund can ensure the division of the fund and normal flow of the fund in hotels while managing. The goods and materials are analysis report form and funds gather the overall states of statistics goods and materials and fund that the report form can be convenient. The systematic characteristic is with little investment, the function is strong, with high efficiency, and it is easy to operate. The thesis is divided into eight chapters. Chapter one a part of the preface, has introduced systematic overview and application. Second, three chapter introduce systematic demand analysis; go on economic feasibility and technical feasibility analysis to system mainly. Fourth, five chapters introduced the system design and the system realization separately. The sixth and seven chapters are some of system testing. System testing is to test concretely every function in the system. Chapter eight is summarizing part. Key words: Administrative system of hotel goods and materials; Come in and go out storehouse management; The fund management II 本科生毕业设计(论文) 目 录 第1章 前 言 ..................................................... 1 第2章 可行性分析 ................................................ 2 2.1 硬件配置及结构 .....................................................................................2 2.2 软件配置 ................................................................................................3 2.2.1 前台软件开发工具Borland Delphi 7.0 .......................................................3 2.2.2 后台数据库Microsoft SQL Server 2000 .....................................................4 2.3 设计方法 ................................................................................................6 2.4 系统结构 ................................................................................................6 第3章 需求分析 .................................................. 7 3.1 工作需求分析.........................................................................................7 3.2 工作 ................................................................................................7 3.3 数据流图 ................................................................................................8 3.4 数据字典 .............................................................................................. 10 第4章 数据库设计 ............................................... 11 4.1 概念设计 .............................................................................................. 11 4.2 物理设计 .............................................................................................. 13 4.3 逻辑设计 .............................................................................................. 13 第5章 程序设计 ................................................. 17 5.1 总体设计 .............................................................................................. 17 5.2 详细设计 .............................................................................................. 19 5.3 菜单设计 .............................................................................................. 22 5.4 模块设计 .............................................................................................. 23 第6章 调试 ..................................................... 29 6.1 系统调试简介....................................................................................... 29 6.2 系统调试的方法和类型 ....................................................................... 30 6.3 系统调试的过程及结果分析 ............................................................... 31 第7章 性能分析 ................................................. 32 第8章 总结 ..................................................... 34 致谢 ............................................................ 35 参考文献 ........................................................ 36 附 录 1:系统部分程序源代码 ..................................... 37 III 本科生毕业设计(论文) 附 录 2:英文文献及翻译 ......................................... 51 IV 本科生毕业设计(论文) 第1章 前 言 在国民经济迅猛增长的今天,城镇居民可支配收入不断增加,人们已不在已温饱为满足,而是更加注重饮食的质量与档次。据调查显示,我国城镇居民在外就餐大幅增长,大众化餐饮成为市场的主流,这极大推进了餐饮行业的快速发展。而在餐饮业竞争越来越激烈的今天,如何提高服务质量、管理能力显得越来越重要。尤其对于大型餐饮场所,其内部服务项目众多,既需要完成前台的一些服务工作,还需要完成后台的物资管理工作。这时如果没有一套可靠的餐饮管理系统,单凭手工操作,不仅效率低下,而且会极大地影响到服务质量。 而本系统则是经过调研后设计出的最完善的最具通用性的酒店物资管理系统。它可以实现对餐饮业内部物资管理的电子化、自动化,为高质量的餐饮服务提供了保证。在数据保存、数据统计等方面均快速可靠,是手工操作所不能相以比拟的。 本系统主要实现对酒店各部门物资的进行管理,包括对物品和资金的管理和统计以及报表打印。 酒店的部门繁多,物品进出频繁,如果采用手工的记帐方式,不但需要大量的人力和时间,而且容易出错。 物流和资金流直接相关,一方面,采购价格决定着采购成本的高低,另一方面,运输、仓储、装卸、库房管理直接影响。 1 本科生毕业设计(论文) 第2章 可行性分析 通过了解各酒店的实际情况,对本物资管理系统的可行性进行如下分析: 1)技术可行性:系统为单人开发,开发需要用时3个月左右,功能全面,( 性能稳定。利用Delphi作为前台应用程序开发工具,Microsoft SQL Server2000 为后台数据库,并结合了软件工程的部分原理来进行开发,技术上比较成熟,即技术上是可行的。 (2)经济可行性:酒店利用计算机来代替以前由人工对管理进行的工作,将大大的提高工作效率,减少了人力资源等。虽然要先支出一部分金额,但是经过一段时间之后,系统所产生的经济效益会远远超过它的投资开发成本,所以说经济上是可行的。 (3)运行环境可行性:系统对运行环境的要求并不苛刻。在硬件上,对计算机的配置要求不高。在软件上,采用Windows操作系统,只需稍做培训即可掌握软件的使用方法,运行及操作上是可行的。 (4)法律可行性:本物资管理系统的使用,不会给使用者带来任何原则上的不良问题,因此法律上是可行的。 综上所述,此系统是可行的。 2.1 硬件配置及结构 操作系统:windows各版本; 前台 :Delphi 7.0; 数据库 :Microsoft SQL Server 2000; CPU :1000MHz以上 内存 :128M以上; 2 本科生毕业设计(论文) 硬盘 :10G以上 2.2 软件配置 2.2.1 前台软件开发工具Borland Delphi 7.0 Delphi 是Borland 公司推出的应用程序开发工具。Delphi在数据库开发方面的出色表现,面向对象的快速开发能力和丰富的显示样式受到广大数据库开发人员的欢迎。 以下便是Borland Delphi的一些主要功能和特点: (1)企业应用的MDA开发。 通过让开发者从设计到部署都使用一个应用,加速了开发进程,同时显著减小了代码量,并节省了开发时间。 (2)可视化的快速Web开发。 让开发者能够在Delphi7环境中可视化地创建Web应用,并且利用它的应用模型框架,不必再考虑通过的服务器端的开发任务,还能透明地处理会话管理。 (3)内建的对Linux的跨平台支持。 Delphi7在出售时将附带Delphi语言版本的Kylix3。Kylix3是第一个在Linux操作系统上的高性能的可视化整合开发环境,它适合用来快速创建数据库应用、GUI应用、Web应用和Web服务应用。 (4)企业级的报表能力。 让开发者能创建跨平台的报表,这些报表能帮助查看应用程序运行的效率。 (5)免费的DataSnap多层应用开发。 Delphi7的DataSnap授权允许开发者无缝地升级单层和客户/服务器应用到多层应用,而无需额外的运行时使用费。 (6)Windows XP应用。 Delphi7对Windows XP风格的支持,让开发者能够创建可以利用Windows XP使用者界面风格的应用。 3 本科生毕业设计(论文) (7)丰富的数据表现风格 Delphi的数据窗口为展现数据的本质提供了丰富的手段,数据窗口能够从多种数据源提取数据,然后以多种风格展现在用户面前,这既包括文本显示方式,也包括统计图分析方式。利用数据窗口,用户可以直观地查询、修改、插入、删除、打印、浏览数据。 (8)功能强大的调试器和多种调试方式 Delphi提供了一个完善强大的内置调试器,开发人员可以利用它单步、断点跟踪应用程序的执行,并在中断模式下查看或修改变量以及对象属性的取值。另外,Delphi还提供了专门跟踪嵌入式SQL语句的功能,从而可以找到与数据访问相关的性能瓶颈问题。 2.2.2 后台数据库Microsoft SQL Server 2000 Microsoft SQL Server 2000是基于客户端/服务器模式的新一代大型关系型数据库管理系统。它在电子商务、数据仓库和数据库解决方案等应用中起着重要的核心作用,为企业的数据管理提供强大的支持,对数据库中的数据提供有效的管理,并采用有效的措施实现数据的完整性及数据的安全性。SQL Server 2000 是一个巨大而复杂的数据库管理系统,本章将介绍SQL Server 2000的体系结构,并在此基础上讲述SQL Server 2000的特点及其组件和管理工具。 SQL Server 2000的体系结构与运行环境 SQL Server 2000是一个基于C/S模式的关系数据库管理系统。 SQL Server 2000 采用C/S体系结构把所有的工作负荷分解为服务器上的任务和客户端任务。客户端应用程序负责商业逻辑和向用户提供数据,服务器负责对数据库的数据进行操作和管理。 客户端应用程序包含显示与用户交互的界面,而对数据库中数据进行的处理描成Transact-SQL语句,并将T-SQL语句送至服务器端,后台的SQL Server 执行该T-SQL语句后,产生查询结果,并将结果返回给客户端的应用程序。T-SQL 4 本科生毕业设计(论文) 是SQL Server 使用的一种数据库查询和编程语言,它除包含标准的SQL 语句外, 还增加了一些非标准的SQL 语句,使其功能更强大。使用T-SQL语言可建立、修 改、查询和管理关系数据库。 以下列出了SQL Server 2000的新特性: 1.数据仓库 , 分析服务。利用联机分析处理工具满足用户所用的商业分析需求。 , 数据转换服务。在不同的数据源之间自动提取、转换和加载数据。 , 数据开采。对数据库仓库的数据进行数据挖掘,发现商业的模式和 趋势,为科学决策提供支持。 , 分析服务。对使用多维存储方式的复杂数据进行快速有效的分析。 , 索引化视图。通过把查询结果存储在数据库中,以减少查询响应时 间,大大改善了系统的性能。 2.电子商务 , 对XML支持的增强。使用XML简化了对后端系统和数据转换的整合。 , Web数据访问。通过使用Web,而不需要额外的编程工作就可以建立 SQL Server 2000数据库和OLAP立方体的连接。 , 分布式分区视图。将用户的数据存储在多个服务器上,从而扩大了 数据库的规模。 , 安全性。SQL Server 2000采用了更好的安全策略。 , 简化数据库管理。SQL Server 2000提供了大量的监控和管理工具, 从而大大减少了管理员的工作量。 , 数据库复制。使用SQL Server 2000可以在不同的系统之间进行合 并、事务和快照复制。 3.可伸缩性和可用性 , 同一个数据库引擎可以在不同的平台上使用。 5 本科生毕业设计(论文) , SQL Server 2000企业版支持联合服务器、索引视图和大型内存等功 能,使其得以升级到最大Web站点所需的性能级别。 4.便于安装使用 SQL Server 2000包括一系列管理和开发工具,这些工具可改进在多个站点上安装、部署、管理和使用SQL Server 的过程。SQL Server 2000还支持基于标准的、与Windows DNA集成的程序设计模型,使SQL Server 数据库和数据仓库的使用成为强大的可伸缩系统。这些功能使应用程序开发者可以快速交付SQL Server 应用程序,使客户以最少的安装和管理开销,实现这些应用程序。 2.3 设计方法 本系统采用快速的原型化开发方法 首先以少量代价快速地构造一个可执行的软件系统模型,通过这个模型,使用户和开发人员可以较快地确定需求,然后采用循环进化的开发方式,对系统模型作连续的补充和修改,将系统应具备的功能和特性逐渐增加上去,直到所有的功能和特性全部满足。 它的优点是软件开发人员向用户提供样品,用户能迅速的做出反馈,所以用快速原型法开发出来的系统更能贴近用户的需求。用户的介入和反馈,使得这种方法开发出来的系统能够更好地适应用户的需求,因而被认为是最有前途的新方法。 2.4 系统结构 此系统为单机结构。此结构安全性较高,由物资管理部门来进行管理和维护。 6 本科生毕业设计(论文) 第3章 需求分析 需求分析的任务不仅是确定系统怎样完成它的工作,还要确定系统必须完成那些工作,也就是对目标系统提出完整、准确、清晰、具体的要求。需求分析的结果是系统开发的基础,关系到工程的成败和软件产品的质量。因此,必须用行之有效的方法对软件需求进行严格的审查验证。 3.1 工作需求分析 通过对酒店物资管理部门的具体调查,对物资管理系统的子系统要有以下几个方面的工作需完成: ?对各种物品进行管理。要求准确、快速、方便的对物品进行合理的出入库管理,并且能够快速的进行查询和统计。 ?对餐厅的内部各项进行管理。要求准确、快速、方便、直观,提供各种信息的统计,并可输出其结果,已经各种查询。 ?对于系统管理要求能作到用户权限设置、用户密码修改、新增用户设置等基本系统维护功能。 ?要求系统具有较好的交互性和操作界面,而且要使用方便、直观。 3.2 工作流程 第1周:熟悉题目、查阅资料 第2周:进行开题答辩 第3、4周:需求分析 第5周:方案设计 第6周:数据库结构设计 7 本科生毕业设计(论文) 第7、8周:系统界面详细设计 第9、10周:系统功能具体划分设计 第11、12周:代码编写 第13、14周:调试、完善 第15、16周:论文编写 第17周:进行毕业设计答辩 3.3 数据流图 数据流图描绘系统的逻辑模型,图中没有任何具体的物理元素,只是描绘信息在系统中流动和处理的情况。数据流图是逻辑系统的图形表示,即使不是专业的计算机人员也容易理解,所以是极好的通信工具。以下就是本系统的数据流图: 酒店物资 信息 报表打印 管理员 物资 管理系统 图3.1 顶层数据流图 8 本科生毕业设计(论文) 报表打印 1 2 信息 管理员 物资 物资 报表 库 存 管理 生成 信 息库 存 信 D1 库存信息 息 图3.2 0层数据流图 D1 计划信息 计划信息 管1.3 2 1.1 1.2 物资 理存储 报表 接收 更新数 报信信计员 管理 生成 信息 表据清单 息息划 打库信印 存息 信库息 存 信 息 D2 库存信息 图3.3 1层数据流图 9 本科生毕业设计(论文) 3.4 数据字典 数据字典是关于数据的信息的集合,也就是对数据流图中包含的所有元素的定义的集合。 任何字典最主要的用途都是供人查阅对不了解的条目的解释。数据字典的作用也正是在软件分析和设计的过程中给人提供关于数据的描述信息。数据流图和数据字典共同构成系统的逻辑模型,没有数据字典,数据流图就不严格,然而没有数据流图,数据字典也难于发挥作用。只有数据流图和对数据流图中每个元素的精确定义放在一起,才能共同构成系统的规格说明。一般来说,数据字典应该由数据流、数据流分量、数据存储、处理四类元素的定义组成。 下面给出本系统部分数据元素的数据字典卡片: 名称:录入用户信息- 别名:新添用户信息 描述:用于建立个人登录及用户操作权限的信息表 定义:用户表 = 编号+用户姓名+密码 位置:用户信息表 录入数据的数据字典卡片 名字:物品查询 别名:查询显示表 描述:各类物品查询以及统计信息 定义:查询结果表 = 物品编号+物品名称以及一些相关的物品信息 位置:输出 查询结果的数据字典卡片 10 本科生毕业设计(论文) 第4章 数据库设计 数据库设计是开发过程遇到的问题合理的表现出来,以支持应用程序的处理 -R图对遇到的问要求,是在现有数据库管理系统上建立数据库的过程。我们用E题进行描述,再用关系数据库的关系模型对E-R模型表示的信息进行组织和存储。 设计数据库和设计软件一样,也要遵循一定规则和周期,数据库系统周期一般分三个阶段。 1.概念设计 将用户信息需求综合起来,从而形成一个概念模型。它的特点是:用E-R图来表示,简明易懂;易于更改和扩充;能充分反映信息关系;具有通用性和稳定性。 2.逻辑设计 将概念模型转换为数据库管理系统下的具体数据模型,并进行规范化,使规模适当,冗余数据少,存取效率高,并满足近期及预见到的将来数据处理要求。 3.物理设计 将逻辑结构转化为具体的物理数据库,按照选定的数据库管理系统设计存取结构和存取方法。 4.1 概念设计 餐饮管理系统是一个数据库设计的应用系统,餐厅的各种内部信息都保存在数据库中。所以说数据库分析以及设计的好坏将直接对应用系统的使用以及实现效果产生影响,好的数据库结构设计会减少数据的存储量,使得数据的完整性和一致性比较高,这样系统就具有了比较快的响应速度。 概念结构的主要特点是: 11 本科生毕业设计(论文) 1.便于向关系、网络等数据模型转换。 2.便于更改,当应用要求和应用环境相对改变时,要容易对概念模型做出相应的修改和扩充。 3.能真实反映现实的世界,包括事物与事物之间的联系,能满足事物对事物之间的处理要求。 4.便于理解,可以用它和不熟悉计算机的用户来交换意见。 实体之间联系的E-R图如下: 物资编号 采购日期 部门编号 采购数量 物资编号 采购计划 需求计划 物资编号 需求数量 采购 需求 需求 部门编号 物资名称 物资 部门 单价 部门名称 资金数额 供应商 单位 资金流向 出库 资金 库存计划 流动日期 入库 物资编号 流动金额 库存数量 12 本科生毕业设计(论文) 图4.1 E-R图 4.2 物理设计 数据库在物理设备上的存储结构与存取方法称为数据库的物理结构。为一个给定的逻辑数据模型选取一个最适合应用要求的物理结构的过程,就是数据库的物理设计。数据库的物理设计通常分为两步: 1.确定数据库的物理结构,在关系数据库中主要指存取方法和存储结构; 2.对数据结构进行评价,评价的重点是时间和空间效率。 4.3 逻辑设计 将概念设计得出的概念模型转换为特定的数据库管理系统能够接受的逻辑模式。再利用所选定的数据管理系统用对应的数据描述语言对数据进行精确定义,即把概念模型映衬到逻辑模型上。 本系统设计的数据库表格如下: 表4.1 物品信息表 列名 类型 长度 键 物资编号 int 4 * 物资名称 varchar 20 单价 money 8 单位 varchar 10 13 本科生毕业设计(论文) 供应商 varchar 20 物资描述 varchar 20 库存数量 int 4 表4.2资金汇总表 列名 类型 长度 键 流动日期 datatime 8 * 资金流向 varchar 20 流动金额 money 8 来源/用途 varchar 10 表4.3部门信息表 列名 类型 长度 键 部门名称 varchar 20 部门编号 int 4 * 资金数额 money 8 备注 varchar 30 表4.4采购计划表 列名 类型 长度 键 物资编号 int 4 * 14 本科生毕业设计(论文) 采购日期 datatime 8 采购数量 int 4 表4.5物资需求计划表 列名 类型 长度 键 需求部门编号 int 4 * 需求物资编号 int 4 需求数量 int 4 表4.6库存计划表 列名 类型 长度 键 物资编号 int 4 * 库存数量 int 4 表4.7物资入库表 列名 类型 长度 键 物资编号 int 4 * 入库数量 int 4 入库时间 datatime 8 表4.8物资出库表 列名 类型 长度 键 15 本科生毕业设计(论文) 物资编号 int 4 * 部门编号 int 4 出库数量 int 4 出库时间 datatime 8 表4.9资金下拨表 列名 类型 长度 键 部门编号 int 4 * 资金数额 money 8 拨款日期 datatime 8 用途 varchar 30 表4.10资金入帐表 列名 类型 长度 键 资金来源 varchar 20 资金数额 money 8 入帐日期 datatime 8 * 此次数据库一共建了10个表,简洁直观,设计合理规范。 16 本科生毕业设计(论文) 第5章 程序设计 通过对各大酒店进行的具体需求分析,得出系统程序设计应遵循以下几个基本的原则: 1、系统需具备高可靠性 系统运行时要做到故障发生率低、恢复时间快、稳定可靠,基本不影响正常 使用。 2、系统必须具有最优的性能价格比 系统软件、硬件必须功能齐全、性能稳定、可靠性高、扩充能力强、价格合 理。 3、开发的系统要具备先进性 本系统欲采用时下最为流行、先进的技术和熟悉的操作平台,以及功能完善、 强大的数据库管理系统,还有性能可靠并稳定的编程语言,开发出来的系统要 求操作简单、快捷,为查询资料提供便捷。 4、软件功能要完善,便于操作 系统必须能够管理酒店内部各种物资,以及各种信息的统计与查询。 5.1 总体设计 总体设计的基本目的是回答“概括地说,系统应该如何实现,”这个问题,因此,总体设计又称为概要设计或初步设计。通过这个阶段的工作将划分出组成的系统的物理元素——程序、文件、数据库、人工过程和文档等等。总体设计阶段的另一项重要任务是设计软件的结构,也就是要确定系统中每个程序是由那些模块组成的,以及这些模块相互间的关系。 总体设计过程首先寻找实现目标系统的各种不同的方案,需求分析阶段得到 17 本科生毕业设计(论文) 的数据流图是设想各种可能方案的基础。然后分析员从这些供选择的方案中选取若干个合理的方案,为每个合理的方案都准备一份系统流程图,列出组成系统的所有物理元素,进行成本/效益分析,并且制定实现这个方案的进度计划,从而得到更合理的结构,进行必要的数据库设计,确定测试要求并且制定测试计划。 本系统的总体结构如下: 酒店物资管理系统 登系计物资参报 陆统划资金数表 管管管管管维管 理理理理理护理 部 门用修使物库采物物物下资资物部资物 物户改用资存购资资资拨金金资门金资 资管密单需计计信入出资入盘信信汇分 理码位求划划息库库金帐点息息总析明 细计查维维报报 表划询护护表表 图5.1 系统功能结构图 18 本科生毕业设计(论文) 5.2 详细设计 开始 连接数据库 N 登录界面 退出 N 身份验证 Y 系统主界面 图5.2登陆信息流程图 19 本科生毕业设计(论文) 系统管理界面 退权限 修改 用户 出 设置 密码 管理 提示 N 非法 操作合法 操作 修改数据库 结束 图5.3系统管理流程图 20 本科生毕业设计(论文) 物资管理 物资信息查询 物资入库 物资出库 输 入 N N 入库、出 查 询 库成功 条件 按条件查询 入 出 库 信N 息 查找成功 清空查询 酒店管理部门 显示查找结果 结束 图5.4物资管理数据流图 21 本科生毕业设计(论文) 输入 处理 输出 物品资料 数据检索 物品统计 资金资料 数据检索 资金统计 部门资料 数据检索 报表显示 图5.5 系统IPO图 5.3 菜单设计 在应用软件中,菜单是再常见不过的了。使用菜单最突出的优点有两个,一是节省屏幕的显示空间,几十上百的功能选择集合到菜单里只占一行的空间。二是对系统功能的分门别类,菜单可以一级一级地展开,形成树形结构,条理清晰, 22 本科生毕业设计(论文) 查找快捷。所以,稍微复杂一点的应用程序几乎无一例外地都使用菜单。 菜单有3种类型:下拉菜单、弹出式菜单和级联菜单。 在设计菜单时,应遵循以下几个原则: (1)菜单的整体要有统筹规划,使其划分合理、条理清晰、简明直观、方便易用。基本做到能够根据前级菜单项知道下级菜单包含内容的范围;根据用户的功能需求,知道应该从哪一个菜单标题以及菜单项去操作。 (2)菜单标题和菜单项的名称设计应当简明扼要,具有概括性和直观性。 (3)采用加速键和快捷键,起到快速和没有鼠标只有键盘也能操作菜单的双重效果。 (4)如果某菜单项将打开一个对话框,则在该菜单项的标题中要使用省略号进行提示。 (5)某一菜单项或这个菜单标题下的菜单项不能使用或禁止使用时,应当时其变灰。 (6)级联菜单的层数不宜太多,菜单栏以及下拉菜单不要超出屏幕范围,否则无法操作。 (7)采用状态栏对菜单的使用提供帮助和提示信息,对菜单项的功能进行详细地说明。 在Delphi中,利用MainMenu组件来创建窗体的菜单。 5.4 模块设计 在系统的生命周期中,经过了可行性研究、需求分析、总体设计、详细设计等几个阶段后,便开始了系统模块设计阶段,系统模块设计阶段要继承此前各个阶段的工作成果,将技术设计转化成为物理实现。模块设计是系统生命周期中继详细设计之后的阶段,这个阶段的任务是使用选定的模块程序设计成语言。 目前,人和计算机通信仍然使用人工设计的语言,也即是程序设计语言。所 23 本科生毕业设计(论文) 谓编码就是把软件设计的结果翻译成计算机可以理解的形式。 编码的目的是实现人和计算机的通信,使计算机按照人的指示工作。程序设计语言是人和计算机通信的最基本的工具,采用了Delphi语言进行开发此软件。因为Delphi是一套非常优秀的编程工具,自从它诞生以来,已逐渐赢得了众多程序员的青睐。它综合了可视化开发环境的易用性,32位优化编辑技术的快速、强大以及数据库引擎的可伸缩性等特点。 下面将对本系统功能及各模块的实现做如下介绍。 1(登录管理模块 当启动窗体结束后,会出现登录对话框,要求用户选择用户名和输入与该用户相应的密码,然后决定是否让该用户进入主程序进行操作。当用户单击登录按钮时,进行身份验证,对用户输入的用户名及密码进行判断,也就是对所选择的用户名和密码在数据库的权限信息表中是否检索成功,然后将出现提示框予以提示成功与否。 图5.6登陆窗体 24 本科生毕业设计(论文) 2(系统主窗体 当用户输入了正确的用户名和密码后便进入了本系统的主窗体,可以进行相应的操作了。下图便是本系统的主窗体: 图5.7系统主窗体 本系统包括六大模块 (1)系统管理 系统初始设置一个超级用户的用户名和密码,操作人员可以利用这个超级用户名和密码登陆系统,之后,可以修改这个超级用户的密码,还可以设置其他的超级用户,可以设置用户的使用权限。 以下便是系统管理的界面: 25 本科生毕业设计(论文) 图5.8系统管理窗体 (2)计划管理模块 该模块在应用程序中相对独立,主要完成一些计划的事前存根,与实际发生额形成对比,采购过程中一计划为参考可以避免采购的盲目性。 26 本科生毕业设计(论文) (3)物资管理模块 该模块是应用程序的主要部分,完成真正意义上的物资管理操作,主要完成物资的入库和出库操作以及库中物资的查询操作。物资的入库清单包括物资编号,物资名称、物资数量、物资单价、物资单位、入库时间等功能。物资的出库清单包括物资编号、物资名称、下拨部门编号、下拨部门名称、出库时间、出库数量等功能。物资查询是对物资基本信息和物资当前库存的查询,主要包括物资编号、物资名称、物资单价、物资单位、物资库存、供应商、物资描述等功能。 (4)资金管理模块: 该模块管理酒店资金的划分和内部资金的正常流动,大体分为:下拨资金,资金入帐,资金盘点。 27 本科生毕业设计(论文) (5)参数维护模块 该模块用来对物资管理中用到的参数进行一系列的维护工作,如添加、删除、修改等。 (6)报表管理模块 该模块用于将可能用到的决策信息生成报表,从而帮助管理者快速、准确、及时的分析问题并且根据报表制定相应的规划。 28 本科生毕业设计(论文) 第6章 调试 6.1 系统调试简介 测试本身的目的是尽可能多地暴露程序中的错误,但是,发现错误的最终目的还是为了改正错误。因此,在成功的测试之后,还必须进一步诊断和改正程序中的错误,这就是调试的任务。具体地说,调试过程由两个步骤组成,它从表示程序中存在错误的某些迹象开始,首先确定错误的准确位置,也就是找出是哪个模块或那些接口引起的错误;然后,仔细研究这段代码以确定问题的原因,并设法改正错误。 调试是软件开发过程中最艰巨的脑力劳动如何在浩如烟海的程序元素中找出有错误的那个元素,这是调试过程中最关键的技术问题。 调试常用的方法主要有五种: ?试探法:调试人员分析错误征兆,猜想故障的大致位置,然后使用前述的一两种调试技术,获取程序中被怀疑的地方附近的信息。 ?回溯法:调试人员检查错误征兆,确定最先发现症状的地方,然后人工沿程序的控制流往回追踪源程序代码,直到找出错误根源或确定故障范围为止。回溯法的另一种形式是正向追踪,也就是使用输出语句检查一系列中间结果,以确定最先出现错误的地方。 ?对分查找法:如果已经知道每个变量在程序内若干个关键点的正确值,则可以用赋值语句或输入语句在程序中点附近注入这些变量的正确值,然后检查程序的输入,如果输出结果是正确的,则故障在程序的前半部分;反之,故障在程序的后半部分。对于程序中有故障的那部分再重复使用这个方法,直到把故障范围缩小到容易诊断的程度为止。 29 本科生毕业设计(论文) ?归纳法:就是从个别推断一般的方法,这种方法从线索出发,通过分析这些线索之间的关系而找出故障。 ?演绎法:从一般原理或前提出发,经过删除和精化的过程推导出结论。用演绎法调试开始时先列出所有看来可能成立的原因或假设,然后一个一个地排除列举出的原因,最后证明剩下的原因确实是错误的根源。 调试的类型主要有三类: ?输入存储器内容:这种方法通常以八进制或十六进制的形式印出存储器的内容。如果单纯依靠这种方法进行调试,那么效率可能是很低的,而且此方法有很多缺点。 ?打印语句:这种方法把程序设计语言提供的标准打印语句插在源程序各个部分,以便输出关键变量的值。 ?自动工具:它利用程序设计语言的调试功能或者使用专门的软件工具分析程序的动态行为。 6.2 系统调试的方法和类型 本系统采用归纳法和演绎法相结合的思路,因为归纳法是从个别推断一般的方法,要先收集一些有关的数据,知道程序哪些事做得对哪些事做的不对,然后在组织这些数据,整理以便发现规律,从而提出关于故障的一个或多个假设。而证明假设的方法是,用它解释所有原始的测试结果。而在组织数据的时候要分析已有的数据,寻找矛盾,补充数据以提出新的假设,这些就是归纳法和演绎法的相互结合之处。 调试的类型采用自动工具。因为用于调试的软件工具的共同功能是设置断点,即当执行到特定的语句或改变特定变量的值时,程序停止执行,程序员可以在终端上观察程序此时的状态。 30 本科生毕业设计(论文) 6.3 系统调试的过程及结果分析 等价测试: 记(A, B)是命题f(x) 的一个等价区间,在(A, B)中任意取x1进行测试。 如果f (x1) 错误,那么f (x) 在整个(A, B)区间都将出错。 如果f (x1) 正确,那么f (x) 在整个(A, B)区间都将正确。 取x=0.5以及x=2.0进行等价测试。结果正确。 容错性测试: 输入错误的数据类型,如“猴”年“马”月。系统提示输入错误。 性能与效率测试: 性能与效率测试中很重要的一项是极限测试,因为很多软件系统会在极限测试中崩溃。例如,给程序输入特别大的数据,程序稳定运行。 31 本科生毕业设计(论文) 第7章 性能分析 本系统设计为六大模块,虽然在设计过程中遇到了很多困难,但还是全部实现,并且基本达到了客户的要求与系统的需求。 要对系统进行性能分析和调试,其前提条件是知道好的性能是什么含义,一般我们可以从以下两个角度来衡量系统性能状态: (1) 响应时间(Response Time) 从用户的角度来看,系统处于良好的性能状态是指系统能够快速响应用户的请求,即系统响应时间短。 具体地说,响应时间是指发出请求的时刻到用户的请求的相应结果返回用户的时间间隔。 本系统的响应时间处于正常范围内。 (2) 吞吐量(Throughput) 从系统管理员角度来看,系统的吞吐量成为系统处于良好的性能状态的指标。 具体地说,吞吐量是在给定时间段内系统完成的交易数量。即系统的吞吐量越大,说明系统在单位时间内完成的用户或系统请求越多, 系统的资源得到充分利用。由于c++语言学习系统完全面对学生用户,在吞吐量方面不会有很大问题。 (3)资源与瓶颈 要使系统处于良好性能状态,就必须让所有的系统资源协调工作。 A. 系统资源(System Resource) 计算机组成十分复杂,但关键的系统资源不外如下这些: CPU 内存 磁盘 输入输出,尤其是网络和串行通信 B(瓶颈(Bottleneck) 32 本科生毕业设计(论文) 在计算机的众多资源中,由于系统配置的原因,某种资源成为系统性能的瓶颈是很自然的事情。 当所有用户或系统请求对某种资源的需求超过它的可用数量范围时,我们称这种资源成为瓶颈。 当系统出现瓶颈时,消除瓶颈是方法通常有两种: 增加成为瓶颈的资源的数量; 减少请求的数量; 本系统在解决瓶颈问题方面主要运用的是增加成为瓶颈的资源的数量的方法,本系统在保持请求数量的基础上增大了资源数量。 33 本科生毕业设计(论文) 第8章 总结 经过三个多月的学习和设计,我所设计的酒店物资管理系统基本成型,可以实现很多强大且实用的功能。 在设计过程中也学到了很多以前不知道的东西,比如动态链接库(dll)的制作,字符串加密技术,防止程序被重复执行等。 不过在设计过程中也遇到了很多困难和麻烦,像数据库的连接等。这主要是由于对SQL2000的了解不够,使用起来还不够熟悉。 通过这次毕业设计,让我学到了很多专业的知识,自身水平也有了一定的提高。以往在理论课学到的知识,能够在毕业设计中发挥用处。但是,我也感到知识的浅薄,尤其是对一些应用软件的使用还不够熟练,这些都是我以后要学习和加强的地方。 34 本科生毕业设计(论文) 致谢 在这次毕业设计完成之际,我想向曾经给我帮助和支持的人们表示衷心的感 我的指导老师陈文实老师给了我很大的支持和帮助,陈老师对谢。首先我要感谢 工作认真负责,理论水平的深厚让我受益匪浅。无论在基础理论上还是具体的实践操作中,陈老师都给了我很多宝贵的意见,我相信这些意见都将对我以后的工作或是学习有很大的帮助和启发。他严谨的治学态度、对我的严格要求以及为人处世的坦荡使我终身受益。在此祝愿他身体健康,全家幸福~ 也要感谢给予我帮助的所有同学。 35 本科生毕业设计(论文) 参考文献 [1] 马丁.敏捷软件开发(影印版).第一版. 中国电力出版社,2003年7月. [2] 刘华.Delphi程序设计基础与上机指导.清华大学出版社,2004年12月. [3] 张海藩.软件工程导论.第一版.北京:清华大学出版社,2002年7月. [4] 陈豫龙.Delphi7—数据库系统开发实例导航.第一版.北京:人民邮电出版 社,2002年4月. [5] 夏邦贵.Delphi数据库开发—入门与范例解析.第一版.北京:机械工业出版 社,2003年7月. [6] 闪四清.SQL 2000系统管理指南.第一版.北京:清华大学出版社,2003年1月. [7] 只飞 .最新Delphi7数据库开发指南. 第一版.北京:北京希望电子出版社, 2003年3月. [8] 岳国荣.SQL Server2000数据库技术实用教程.第一版.北京:中国电力出版 社,2005年1月. [9] 伍俊良.Borland Delphi应用与开发教程.第一版.北京:清华大学出版 社,2004年6月. [10]张海卿.Delphi7实用编程100例.第一版.北京:中国铁道出版社,2003年4 月. [11]张增强.Delphi7数据库开发完全手册.第一版.北京:清华大学出版社,2003 年4月. [12]赵万军.Delphi软件项目开发实例.第一版.北京:电子工业出版社,2004年11 月. [13]Patrick dAstous Philippe Kruchten.软件工程过程.第一版.北京:清华大学 出版社,2003年8月. [14]Abraham Silberschatz.数据库系统概念.第四版.北京:机械工程出版 社,2003年3月. [15]李维.一个delphi高手的成长之路.发表于《Delphi园地》2004年第二期. 36 本科生毕业设计(论文) 附 录 1:系统部分程序源代码 ? 登录窗体源代码: unit login; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons; type TfrmLogIn = class(TForm) Label1: TLabel; Label2: TLabel; name: TEdit; pwd: TEdit; Label3: TLabel; BitBtn1: TBitBtn; BitBtn3: TBitBtn; private { Private declarations } public { Public declarations } end; 37 本科生毕业设计(论文) var frmLogIn: TfrmLogIn; implementation {$R *.dfm} end. ? 主窗体源代码: unit MAIN; interface uses Windows, SysUtils, Classes, Graphics, Forms, Controls, Menus, StdCtrls, Dialogs, Buttons, Messages, ExtCtrls, ComCtrls, StdActns, ActnList, ToolWin, ImgList; type TMainForm = class(TForm) StatusBar: TStatusBar; MainMenu1: TMainMenu; File1: TMenuItem; changePwd: TMenuItem; company: TMenuItem; N1: TMenuItem; FileExitItem: TMenuItem; N2: TMenuItem; 38 本科生毕业设计(论文) N3: TMenuItem; N4: TMenuItem; N5: TMenuItem; N6: TMenuItem; N7: TMenuItem; N8: TMenuItem; N9: TMenuItem; N10: TMenuItem; N11: TMenuItem; N12: TMenuItem; N13: TMenuItem; N14: TMenuItem; N15: TMenuItem; N16: TMenuItem; N17: TMenuItem; N19: TMenuItem; N20: TMenuItem; N21: TMenuItem; N22: TMenuItem; N23: TMenuItem; N24: TMenuItem; ToolBar2: TToolBar; N0: TMenuItem; procedure FileExit1Execute(Sender: TObject); procedure N24Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure changePwdClick(Sender: TObject); 39 本科生毕业设计(论文) procedure companyClick(Sender: TObject); procedure FileOpenItemClick(Sender: TObject); procedure N3Click(Sender: TObject); procedure N5Click(Sender: TObject); procedure N4Click(Sender: TObject); procedure N17Click(Sender: TObject); procedure N16Click(Sender: TObject); procedure N7Click(Sender: TObject); procedure N8Click(Sender: TObject); procedure N10Click(Sender: TObject); procedure N12Click(Sender: TObject); procedure N13Click(Sender: TObject); procedure N14Click(Sender: TObject); procedure N20Click(Sender: TObject); procedure N21Click(Sender: TObject); procedure N22Click(Sender: TObject); private { Private declarations } procedure CreateMDIChild(const Name: string); procedure setPower(i:integer); public { Public declarations } end; var MainForm: TMainForm; 40 本科生毕业设计(论文) implementation {$R *.dfm} uses CHILDWIN, about,changePwd,registerCompany,authorization, needPlan,stockPlan,buyPlan,wzinfo,bminfo,addStock,deleteStock, queryWz,sendMoney,addMoney,checkMoney,moneyRep,WzRep,mingxi; function checkPassword(s:string):integer;far;external 'mylogin.dll'; function getUserName:string;external 'mylogin.dll'; procedure TMainForm.CreateMDIChild(const Name: string); var Child: TMDIChild; begin { create a new MDI child window } Child := TMDIChild.Create(Application); Child.Caption := Name; if FileExists(Name) then Child.Memo1.Lines.LoadFromFile(Name); end; procedure TMainForm.FileExit1Execute(Sender: TObject); begin Close; end; procedure TMainForm.N24Click(Sender: TObject); 41 本科生毕业设计(论文) begin AboutBox.ShowModal; end; procedure TMainForm.FormShow(Sender: TObject); var rt:integer; begin rt:=checkPassword('物资管理系统'); if rt=0 then begin close; application.Terminate; end; setPower(rt); end; procedure TMainForm.changePwdClick(Sender: TObject); var rt:integer; begin frmChangePwd:=TFrmChangePwd.Create(self); rt:=frmChangePwd.ShowModal; if rt=mrOk then //修改密码 begin frmChangePwd.changePwd(getUserName); //调用修改密码窗体对象的方法 end; 42 本科生毕业设计(论文) frmChangePwd.Destroy; end; procedure TMainForm.companyClick(Sender: TObject); var rt:integer; f:file; s1,s2,s3,s4:string[160]; begin frmRegisterCompany:=TFrmRegisterCompany.Create(self); if fileExists('info.ini') then //如果单位配置文件存在 begin assignFile(f,'info.ini'); reSet(f,1); //打开文件读出信息 blockRead(f,s1,60); blockRead(f,s2,100); blockRead(f,s3,12); blockRead(f,s4,28); frmRegisterCompany.edit1.Text:=s1; frmRegisterCompany.edit2.Text:=s2; frmRegisterCompany.edit3.Text:=s3; frmRegisterCompany.edit4.Text:=s4; closeFile(f); end; rt:=frmRegisterCompany.ShowModal; if rt=mrOk then //录入使用单位信息 begin 43 本科生毕业设计(论文) frmRegisterCompany.registerCompany; //调用使用单位信息窗体对象的方法 end; frmRegisterCompany.Destroy; end; procedure TMainForm.FileOpenItemClick(Sender: TObject); begin frmAuthorization:=TFrmAuthorization.Create(self); frmAuthorization.ShowModal; end; procedure TMainForm.setPower(i: integer); begin if i=3 then//具有访问者权限 begin n0.Enabled:=false; company.Enabled:=false; N7.Enabled:=false; n8.Enabled:=false; n12.Enabled:=false; n13.Enabled:=false; n15.Visible:=false; end else if i=2 then //具有操作员权限 begin n0.Enabled:=false; company.Enabled:=false; 44 本科生毕业设计(论文) end; end; procedure TMainForm.N3Click(Sender: TObject); begin frmNeedPlan:=TFrmNeedPlan.Create(self); frmNeedPlan.ShowModal; end; procedure TMainForm.N5Click(Sender: TObject); begin frmStockPlan:=TFrmStockPlan.Create(self); frmStockPlan.ShowModal; end; procedure TMainForm.N4Click(Sender: TObject); begin frmBuyPlan:=TFrmBuyPlan.Create(self); frmBuyPlan.ShowModal; end; procedure TMainForm.N17Click(Sender: TObject); begin frmWzInfo.ShowModal; end; procedure TMainForm.N16Click(Sender: TObject); 45 本科生毕业设计(论文) begin frmBmInfo.ShowModal; end; procedure TMainForm.N7Click(Sender: TObject); begin frmAddStock.ShowModal; end; procedure TMainForm.N8Click(Sender: TObject); begin frmDeleteStock.ShowModal; end; procedure TMainForm.N10Click(Sender: TObject); begin frmQueryWz.ShowModal; end; procedure TMainForm.N12Click(Sender: TObject); begin frmSendMoney.ShowModal; end; procedure TMainForm.N13Click(Sender: TObject); begin frmAddMoney.ShowModal; 46 本科生毕业设计(论文) end; procedure TMainForm.N14Click(Sender: TObject); begin frmCheckMoney:=TFrmCheckMoney.create(self); frmCheckMoney.ShowModal; end; procedure TMainForm.N20Click(Sender: TObject); begin frmMoneyRep:=TFrmMoneyRep.create(self); frmMoneyRep.QuickRep1.Preview; end; procedure TMainForm.N21Click(Sender: TObject); begin frmWzRep:=TfrmWzRep.create(self); frmWzRep.QuickRep1.Preview; end; procedure TMainForm.N22Click(Sender: TObject); begin frmMingxi:=TFrmMingxi.create(self); frmMingxi.QuickRep1.Preview; end; end. 47 本科生毕业设计(论文) ?字符串加密源代码: unit comFunc; interface const C1 = 52845; C2 = 22719; function Encrypt(const S: String; Key: Word): String; function Decrypt(const S: String; Key: Word): String; function isMoney(s:string):boolean; function isInteger(s: string): boolean; implementation uses IdGlobal; {字符串加密函数的实现} function Encrypt(const S: String; Key: Word): String; var I: byte; begin setLength(result,length(s)); for I := 1 to Length(S) do begin Result[I] := char(byte(S[I]) xor (Key shr 8)); Key := (byte(Result[I]) + Key) * C1 + C2; end; end; {字符串解密函数的实现} function Decrypt(const S: String; Key: Word): String; var I: byte; begin setLength(result,length(s)); for I := 1 to Length(S) do 48 本科生毕业设计(论文) begin Result[I] := char(byte(S[I]) xor (Key shr 8)); Key := (byte(S[I]) + Key) * C1 + C2; end; end; {判断是否为货币的函数实现} function isMoney(s: string): boolean; var i:integer; begin if length(s)=0 then begin result:=false; exit; end; i:=1; while i<=length(s) do begin if (isNumeric(s[i])=false) and (s[i]<>'.') then begin result:=false; exit; end; i:=i+1; end; result:=true; end; {判断是否为整数的函数实现} function isInteger(s: string): boolean; var i:integer; begin i:=1; if length(s)=0 then 49 本科生毕业设计(论文) begin result:=false; exit; end; while i<=length(s) do begin if (isNumeric(s[i])=false) then begin result:=false; exit; end; i:=i+1; end; result:=true; end; end. 50 本科生毕业设计(论文) 附 录 2:英文文献及翻译 英文文献 The software test organization and method The software test is an important link of the software development, being value by the people increasingly.For finding out the mistake in the procedure possibly and much, produce a software product of high quantity, strengthen to the organization of test the work and manage and then seem to be as importance. A, the software existence period A software from start plan, arrive to abandon need not, be called the software existence period.Generally speaking, the week of the software existence includes the plan and develop, circulates three period, expect at that time and can is divided into some smaller stages each time.Plan period of main mission is an analytical customer request, analyze the main target of the new system and develop the possibility of that system.Develop the period wants to complete the design and carries out the two greatest missions concrete.Is divided into the need analysis, the essentials design in a specific way, detailed design, code, test.It is the last two stage that the software develops the period to among them code and test.Circulate period is a software to exist the period the last period, software personnel the work that expect at that time here, mainly is to work well the software maintenance. Statistics the enunciation, develop the more large-scale software, have 40% the above energy is to waste on the test of, even rich experienced procedure member, also difficult do not need to take place the mistake in the coding, besides, write the mistake at design even the analytical stage covers up already the root of all evil, is a mistake incubated down in early days or code regardless in the mistake that led to go into lately, if the hour of can not compare with expel, a credibility that lowered the software, heavy cause the whole system of failure.For defending to suffer from in not yet, the importance that emphasizes the software test is necessary. Two, the process and the method of the test 1, the purpose of the test In G.J.Myers classic work 《 the software test technique 》 , give the definition of the test: " The procedure test is for discovering the process of the mistake but the 51 本科生毕业设计(论文) performance procedure".The purpose of the test is to discover the mistake in the procedure, ising for the sake of the certificate procedure wrong, not prove that the procedure have no wrong.In software develop process, analysis, design and code the etc., the works are all constructive, testing only is to take" destructiveness", the test can be regarded as to analyze, design and code 3" end appeal trial" of stage, have the important position in the software quality control.For insuring the quantity of the software, the more ideal way of doing should be the result to the development process of the software, press each stage of engineering of software formation, carrying on the strict reviewing respectively. 2, the process of the test Design the work complete hereafter, should begin the preparation of the test to work, speak generally, from an acquaint with to the whole system design of design the personnel the plait writes to test the outline, the standard that contents and tests pass of the explicit test, design the test of the integrity reasonable to use the example, for the purpose of system carry out the juniors to go to test completely. At carry out set will the procedure experience certificate develop after, hand over to test the set, from test the representative director organization test, test can press the row method organization generally: (1) first, test the personnel to want relevant data of careful reading, include the specification elucidation, design the text file, use the manual and in design process formative test outline, the test contents and test of pass the standard, acquaint with the system completely, the plait writes the test plan, design the test uses the example, making the preparation work in good test. (2) for the sake of the quantity of the assurance test, be divided into the test process a few stage, namely:The code reviewing, unit test, gather test and check before acceptance the test. (3) the code conduct trial jointly: It is process that be passed the reading, discussion and controversies to carry on the static state analysis to the procedure by a person that code conduct trial jointly.Conduct trial jointly the group from the senior clerk,2-3 program design and test the personnel and the procedure member to constitute.Conduct trial jointly the group to stay to review the procedure text in the full reading originally, control flow chart and relevant request, norm etc. the document foundation up, convene the code to conduct trial jointly meeting, the procedure member explains in detail the logic of the procedure sentence by sentence, 52 本科生毕业设计(论文) and launch the warm discussion to even dispute, to announce to public mistake of key place.Practice the enunciation, the procedure member can discover in explain in detail process the mistake that many oneselfs didn't discover originally, but the discussion and controversies then further urged the revelation of the problem.For example, to the discussion of a certain and partial small problem modification method, the possible detection has with it to embroil of even can involve the big problem of 功 elucidation, the mold an indirect and system total structure of the mold piece, cause heavy definition, heavy design verification that defines to the need, improved the quantity of the software consumedly. (4) unit test: The unit test concentration in checking the minimum unit- mold piece of the software design, the circumstance that actual function that carries out that mold piece through the test detection out of accordance with define the function of that mold piece elucidation match, and the mistake that code.Because a scale of mold is small, the function one, logic is simple, testing the personnel to pass a manual of mold and the source procedures probably, understanding the condition of I/ O of that mold piece and the logic structure of the mold pieces clearly, the adoption structure test( a method) of with example, attain possibly to test thoroughly, then assist it to test( a method) with the function of with example, make it can discriminate and respond to to any reasonable and not reasonable importations.The mold piece of the high credibility is solid foundation that constitutes the dependable system. (5) gather test: Gather the test is to assemble the mold piece requests according to the design at the same time to carry on the test, the main target is the problem that the detection has something to do with connect a people.If the data cuts through to connect may throw to lose;A mold piece and another mold pieces may result in because of negligent problem the harmful influence;Put together the sub- function set possibility does not produce anticipant of main function;Looking separately is the degree that the possible backlog of acceptable error margin arrives and can't accept;The whole distance data structure may have the mistake etc.. (6) check before acceptance the test: The purpose that checks before acceptance the test is to can be like to schedule to request to work so toward the future customer enunciation system.After gather test, already according to the software system that design become an of a construction of all 53 本科生毕业设计(论文) moldses integrity, connect a people's mistake also already basic exclusion, should further verify the usefulness of the software immediately after, this is the mission that checks before acceptance the test, namely the function and functions of the software like customer reasonable expectant so. After carrying on the test to the software through above-mentioned test process, the software is basic to satisfy the request of the development, testing to announce the be over, after experience accept, hand over software customer. 3. the test method analysis Gather test and afterward of test stage, adopt a method generally. (1) put forward the basic test to use the example with the side value analysis method and( or) etc.s price classification method; (2) use to guess the new test of the method complement to use the example; (3) if imply the conditional combination of importation in the function elucidation of the procedure, proper use the cause and effect diagram method in a beginning, then press above(1),(2) two the steps carry on. The design strategy of the unit test has a little bit the dissimilarity.Because while designing the procedure to use the example for the mold piece, can consult the source procedure of the mold piece directly.So the strategy of the unit test, always combine the usage to a method and a method.The concrete way of doing have two kinds of: A, follow the above-mentioned step first to put forward a basic test to use the example with a method, then make the verification with a method.If the detection use the example and can not satisfy with a test with output method need of overlay the standard, increase with a method to repair the new test to satisfy them with the example.Standard of overlay should concrete circumstance assurance of the basis mold piece.Request to the credibility the higher mold piece, usually want to satisfy the condition combination to overlay or the path overlay the standard. B, use the logic structure of a method analysis mold piece first, put forward a batch of tests to use the example, then carry on the complement with a method according to the function of the mold piece. Three, test the personnel's organization The person is to test have most the value in the work is also the most important resources, have no a qualified and aggressive test group, test impossible realization.Complete to test the mission efficiently for the high quality, like of test the engineer and should have as follows ability: 54 本科生毕业设计(论文) 1, the communication ability The owner that an ideal tester must can test to involve together carries on the communication, having with technique( developer) and the exchanges ability of the non- technical personnel( customer, manager)s.Since want to can talk to get with customer, develop the personnel to say together again up words, is these two persons to have no common language unfortunately.Must put with point of the customer conversation and can handle with accuracy in the system what and can't handle what up.But similar to developer talk information, must live these to re- organize the expression to come out in another way, the member of the test group must can the equal ground is together the customer and developer communications. 2, technique ability For the total speech, develop the personnel to maintain a kind of attitude for despise to those do not understand the technical person.Once a certain member of the test group made break of a mistake settle, so their credibility will be spread to go out immediately.A tester must since is understand to be measure the concept of the software system wants again and would use those tool in the engineering.To attain this demand contain the above plait distance experience of several years, the development experience that expected before was in aid of to develop to the softwares the process contain more thorough comprehension, from develop the right evaluation tester of the personnel's angle, simplify the learn curve that the automatic test tool weaves the distance. 3, from confidence The developer blamed the tester wrong the matter that often have, the tester must have enough self-confident heart to own standpoint.If allow the other people to point the east to point the west by themselves, can't complete what more affairs. 4, diplomacy ability When you tell the someone his wrong, must use some diplomacy methods.The tactful well experienced and the diplomacy skills contribute to the maintenance and develop the personnel to help to make the relation, tester while tell the developer that his software contain mistake, also need the certain diplomacy wrist equally.If the method for adopt is too tough, to tester, at hereafter cooperate the aspect with the development section equal to" won the war but lost the battle". 5, sense of humor Under the condition of meeting the artful self-defence, the animadversion of a humor 55 本科生毕业设计(论文) will do good very much. 6, very strong memory An ideal tester should there is ability come out the similar mistake that met ever before from an excavation of memory, this ability is testing the value in the process and can'ting measure.Because the problem of many new emergence and the problem discrepancy that we discover already is only a few. 7, the doubt spirit Can anticipate, the developer will offer the effort that they are biggest to explain all mistakes in the past.Measure type must hear everybody's elucidation, but he must keep the doubt until he sees by himself hereafter. 8, speed up by one's own The dry test work make you become idle very easily.Only those talented persons who has the ego to speed up the ability enable the oneself to work in go order everyday. 9, insight A test the standpoint that the engineer have" test is for break" goodly, succeed in catching the ability of the customer standpoint, the quantity of the mightiness pursue, to the concern ability of the detail.The judgment ability of the applied high risk area in order to aim at limited test point link. In fine, the test is a stage of key within the software existence period, is also one of the important activities that guarantees the software quantity.No matter how it is emphasize that the importance and the influence of it upon the software credibility of the software test all not excessively, face the increment of the aggrandizement, complicated degree of the software development scale, more should height value the software tests the organization and managements of the work, to speak of the software quantity. 56 本科生毕业设计(论文) 文献译文 软件测试组织与方法 软件测试作为软件开发的一个重要环节,日益受到人们的重视。为了尽可能多地找出程序中的错误,生产出高质量的软件产品,加强对测试工作的组织和管理就显得尤为重要。 一、 软件生存周期 一个软件从开始计划起,到废弃不用止,称为软件生存周期。一般来说,软件生存周包括计划、开发、运行三个时期,每一时期又可分为若干更小的阶段。计划时期的主要任务是分析用户要求,分析新系统的主要目标以及开发该系统的可行性。开发时期要完成设计和实现两大任务具体。具体分为需求分析、概要设计、详细设计、编码、测试。其中编码和测试是软件开发期的最后两个阶段。运行时期是软件生存周期的最后一个时期,软件人员在这一时期的工作,主要是做好软件维护。 统计表明,开发较大规模的软件,有40%以上的精力是耗费在测试上的,即使富有经验的程序员,也难免在编码中发生错误,何况,有写错误在设计甚至分析阶段早已埋下祸根,无论是早期潜伏下来的错误或编码中新引入的错误,若不及时排除,轻者降低软件的可靠性,重者导致整个系统的失败。为防患于未然,强调软件测试的重要性是必要的。 二、 测试的过程与方法 1、 测试的目的 在G.J.Myers的经典著作《软件测试技巧》中,给出了测试的定义: "程序测试是为了发现错误而执行程序的过程"。测试的目的是发现程序中的错误,是为了证明程序有错,而不是证明程序无错。在软件开发过程中,分析、设计与编码等工作都是建设性的,惟独测试是带有"破坏性",测试可视为分析、设计和编码3个阶段的"最终复审",在软件质量保证中具有重要地位。为了确保软件的质量,较理想的做法应该是对软件的开发过程,按软件工程各阶段形成的结果,分别进行严格的审查。 2、测试的过程 当设计工作完成以后,就应该着手测试的准备工作了,一般来讲,由一位对整个系统设计熟悉的设计人员编写测试大纲,明确测试的内容和测试通过的准则,设计完整合理的测试用例,以便系统实现后进行全面测试。 在实现组将所开发的程序经验证后,提交测试组,由测试负责人组织测试,测试一般可按下列方式组织: (1)首先,测试人员要仔细阅读有关资料,包括规格说明、设计文档、使用说明书及在设计过程中形成的测试大纲、测试内容及测试的通过准则,全面熟悉系统,编写测试计划,设计测试用例,作好测试前的准备工作。 (2)为了保证测试的质量,将测试过程分成几个阶段,即:代码审查、单元测 57 本科生毕业设计(论文) 试、集成测试和验收测试。 (3)代码会审: 代码会审是由一组人通过阅读、讨论和争议对程序进行静态分析的过程。会审小组由组长,2,3名程序设计和测试人员及程序员组成。会审小组在充分阅读待审程序文本、控制流程图及有关要求、规范等文件基础上,召开代码会审会,程序员逐句讲解程序的逻辑,并展开热烈的讨论甚至争议,以揭示错误的关键所在。实践表明,程序员在讲解过程中能发现许多自己原来没有发现的错误,而讨论和争议则进一步促使了问题的暴露。例如,对某个局部性小问题修改方法的讨论,可能发现与之有牵连的甚至能涉及到模块的功说明、模块间接口和系统总结构的大问题,导致对需求定义的重定义、重设计验证,大大改善了软件的质量。 (4)单元测试: 单元测试集中在检查软件设计的最小单位-模块上,通过测试发现实现该模块的实际功能与定义该模块的功能说明不符合的情况,以及编码的错误。由于模块规模小、功能单一、逻辑简单,测试人员有可能通过模块说明书和源程序,清楚地了解该模块的I/O条件和模块的逻辑结构,采用结构测试(白盒法)的用例,尽可能达到彻底测试,然后辅之以功能测试(黑盒法)的用例,使之对任何合理和不合理的输入都能鉴别和响应。高可靠性的模块是组成可靠系统的坚实基础。 (5)集成测试: 集成测试是将模块按照设计要求组装起来同时进行测试,主要目标是发现与接口有关的问题。如数据穿过接口时可能丢失;一个模块与另一个模块可能有由于疏忽的问题而造成有害影响;把子功能组合起来可能不产生预期的主功能;个别看起来是可以接受的误差可能积累到不能接受的程度;全程数据结构可能有错误等。 (6)验收测试: 验收测试的目的是向未来的用户表明系统能够像预定要求那样工作。经集成测试后,已经按照设计把所有的模块组装成一个完整的软件系统,接口错误也已经基本排除了,接着就应该进一步验证软件的有效性,这就是验收测试的任务,即软件的功能和性能如同用户所合理期待的那样。 经过上述的测试过程对软件进行测试后,软件基本满足开发的要求,测试宣告结束,经验收后,将软件提交用户。 3(测试方法分析 集成测试及其后的测试阶段,一般采用黑盒方法。 (1)用边值分析法和(或)等价分类法提出基本的测试用例; (2)用猜测法补充新的测试用例; (3)如果在程序的功能说明中含有输入条件的组合,宜在一开始就用因果图法,然后再按以上(1)、(2)两步进行。 单元测试的设计策略稍有不同。因为在为模块设计程序用例时,可以直接参考模块的源程序。所以单元测试的策略,总是把白盒法和黑盒法结合运用。具体 58 本科生毕业设计(论文) 做法有两种: a、先仿照上述步骤用黑盒法提出一组基本的测试用例,然后用白盒法作验证。如果发现用黑盒法产生的测试用例未能满足所需的覆盖标准,就用白盒法增补新的测试用例来满足它们。覆盖的标准应该根据模块的具体情况确定。对可靠性要求较高的模块,通常要满足条件组合覆盖或路径覆盖标准。 b、先用白盒法分析模块的逻辑结构,提出一批测试用例,然后根据模块的功能用黑盒法进行补充。 三、测试人员组织 人是测试工作中最有价值也是最重要的资源,没有一个合格的、积极的测试小组,测试就不可能实现。为高质高效地完成测试任务,好的测试工程师应具有如下能力: 1、沟通能力 一名理想的测试者必须能够同测试涉及到的所有人进行沟通,具有与技术(开发者)和非技术人员(客户,管理人员)的交流能力。既要可以和用户谈得来,又能同开发人员说得上话,不幸的是这两类人没有共同语言。和用户谈话的重点必须放在系统可以正确地处理什么和不可以处理什么上。而和开发者谈相同的信息时,就必须将这些活重新组织以另一种方式表达出来,测试小组的成员必须能够同等地同用户和开发者沟通。 2、技术能力 就总体言,开发人员对那些不懂技术的人持一种轻视的态度。一旦测试小组的某个成员作出了一个错误的断定,那么他们的可信度就会立刻被传扬了出去。一个测试者必须既明白被测软件系统的概念又要会使用工程中的那些工具。要做到这一点需要有几年以上的编程经验,前期的开发经验可以帮助对软件开发过程有较深入的理解,从开发人员的角度正确的评价测试者,简化自动测试工具编程的学习曲线。 3、自信心 开发者指责测试者出了错是常有的事,测试者必须对自己的观点有足够的自信心。如果容许别人对自己指东指西,就不能完成什么更多的事情了。 4、外交能力 当你告诉某人他出了错时,就必须使用一些外交方法。机智老练和外交手法有助于维护与开发人员的协作关系,测试者在告诉开发者他的软件有错误时,也同样需要一定的外交手腕。如果采取的方法过于强硬,对测试者来说,在以后和开发部门的合作方面就相当于"赢了战争却输了战役"。 5、幽默感 在遇到狡辩的情况下,一个幽默的批评将是很有帮助的。 6、很强的记忆力 一个理想的测试者应该有能力将以前曾经遇到过的类似的错误从记忆深处挖掘出来,这一能力在测试过程中的价值是无法衡量的。因为许多新出现的问题和 59 本科生毕业设计(论文) 我们已经发现的问题相差无几。 7、怀疑精神 可以预料,开发者会尽他们最大的努力将所有的错误解释过去。测式者必须听每个人的说明,但他必须保持怀疑直到他自己看过以后。 8、自我督促 干测试工作很容易使你变得懒散。只有那些具有自我督促能力的人才能够使自己每天正常地工作。 9、洞察力 一个好的测试工程师具有"测试是为了破坏"的观点,捕获用户观点的能力,强烈的质量追求,对细节的关注能力。应用的高风险区的判断能力以便将有限的测试针对重点环节。 总之,测试是软件生存周期中的一个关键的阶段,也是保证软件质量的重要活动之一。无论怎样强调软件测试的重要性和它对软件可靠性的影响都不过分,面对软件开发规模的增大、复杂程度的增加,更应高度重视软件测试工作的组织与管理,以提到软件质量。 60 本科生毕业设计(论文) 61
/
本文档为【【精品】酒店物资管理系统的开发目的是为了创造一个功能全面99】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索