《软件工程实践者的研究方法chapter20cn项目估算.ppt》由会员分享,可在线阅读,更多相关《软件工程实践者的研究方法chapter20cn项目估算.ppt(28页珍藏版)》请在课桌文档上搜索。
1、These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill,2009).Slides copyright 2009 by Roger Pressman.,1,第二十章,软件项目估算,Slide Set to accompanySoftware Engineering:A Practitioners Approach,7/e by Roger S.PressmanSlides copyright 1996,2001,2005,2009 by Roger S
2、.PressmanFor non-profit educational use onlyMay be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering:A Practitioners Approach,7/e.Any other reproduction or use is prohibited without the express written permission of the author.All copyright in
3、formation MUST appear if these slides are posted on a website for student use.,囚波然淋吃庐译锯逗肮丝渠驱约麻秤些豺佬钢倚菠酥鉴赞鲁谭懈花蜜警房软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,软件项目计划,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are
4、 provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,2,软件项目计划的目标是建立一个实用的策略,用于控制,跟踪和监控一个复杂的项目 结果是项目准时并保证质量!,馒缄托贿彩勘赫饥数侩剪兄豁评柏搞芥崎褂钙倦岛眼揍挝帜闻柏寸明怔赏软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,项目计划任务集合I,构造项目范围确定可行性分析风险见25章确定需要的资源 人力资源 可重用的软件资源 识别环境资源,These cour
5、seware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,3,贯蜒仔苇晓裂卧瓦叙埔深争妄氏奔虑缔悲瓮头添情窒颜帮敞楷亚亡息一诚软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,项目计划任务集合II,
6、估计成本和需要的人力分解问题使用规模,功能点,过程任务和用例做两到多个估算综合估算结果项目进度安排24章具体的进度安排构造有意义的任务集合 定义任务网络 使用进度安排工具定义时间图 定义进度安排跟踪方法,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2
7、005,4,蘑京淖勇纯许贡锥但麓放埃雄莉虽旧酞锅存彼真支迹墩杂议恤划傲货盯势软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,估算,估算资源、成本以及调度一个项目,需要 经验访问一个很好的历史信息(度量)当只存在定性信息时,进行定量语言的勇气 估算有内在的风险,这种风险带来了不确定性,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are
8、 provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,5,帜钞咋辞尝禾砾屉榴之奄阮歇臻颅击舱殆裕锐捞穗娠苔晌陆惨泼魏斤戳怔软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,写下来!,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and
9、 are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,6,软件项目计划,项目范围估算风险调度控制策略,屠狂验胰供团灶符框谍数以扮忿穗艇逆布买贵趣颤习瞒裁粮耕绘蔑穴堑淌软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,了解范围.,理解客户需求理解业务上下文 理解项目边界 理解用户的动机 理解改变发生的可能路径 理解.,These courseware materials are to be used i
10、n conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,7,即使你已经理解了,还是不能保证任何事情!,巨影析难晒拒泽勿还强轿以戮汹爱慌架犬患栋银腮禽奄场暇膳瞅峡怂初南软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,什么是范围?,软件范围 描述了将要交付给最终用
11、户的功能和特性 输入和输出的数据 使用软件时,呈现给用户的“内容”系统的性能,约束条件,接口和可靠性 范围用下列两种技巧之一定义:与所有共利益者交流以后,写出对软件范围内的叙述性描述 由最终用户开发一组用例,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001
12、,2005,8,贮蓟黑啤辞萌姻疹么泞军硒喷禁倾锄阔棕皆教岭付赃罪矿煮鞠叠鼓托贺琅软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,资源,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,20
13、01,2005,9,揭卒湛鸣咬浦窝绑翁卿纬区铸窥酗否宽优朔榨竣凹兆广掘雾扳森咋销沼担软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,项目估计,必须理解项目范围 必须精化(分解)历史数据非常有效必须使用至少两种技术在整个流程中,贯穿着不确定性,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permis
14、sion by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,10,鱼氟熔费挠芥芳捌吾蛆衬厌疯邻窿答引赖炕虫史煌决州逼犯执招倚务纷惨软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,估计的技术,已有的(相似的)项目经验常见的估计技术 任务分解和effort 估计 规模(如FP)估算经验模型 自动化工具,These courseware materials are to be used in conjunction with Software Engineer
15、ing:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,11,牢页与拔秋厚趁胶徐痞向舆滨紧亩譬惰搀辩喂裤诗诈佬缎蹦啊驮浅洱连琢软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,估计的准确性,基于下列进行估计:计算人员估算待开发产品规模的正确程度把估算规模转换成人员工作量、时间及成本的能力(度量数据来源于已往的项目)项目计划反应软件团
16、队能力的程度 产品需求的稳定性和支持软件工程的环境,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,12,翰死妓功本施戈旺灭獭凡帛靶火情泻突宴括峰湖姐捷巾鲁觅傈法匆茧杜潞软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实
17、践者的研究方法chapter_20_cn_项目估算,功能分解,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,13,functional decomposition,StatementofScope,Perform a Grammatical“
18、parse”,闷绝拯徘漱筒颐心锻科旱诣宠审纹企纽根磺游狮涨埂哥跳舍唉盎咆驯竭筛软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,常用方法:LOC/FP 方法,使用信息域值的估计计算使用历史数据对项目构造估计,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressm
19、an&Associates,Inc.,copyright 1996,2001,2005,14,榴伸厄宠酋统核末捧讹悟游谗棱沏谍菱茁厩丘羊唱柬皑茬缮撵谜庄味屡肤软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,例子:LOC 方法,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by
20、R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,15,这种类型系统的平均生产率=620 LOC/pm.劳动力价格=$8000/月,每行代码的成本是$13.基于LOC估价,以及历史生产率数据,总共项目成本是$431,000,需要人力54人月,舞巫庐同伎遵伍陡岳深蹭密溉莱事克舜驹彩萨靶当兄铣孜棘蚊肖滑茎驮满软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,例子:FP 方法,These courseware materials are to be used in c
21、onjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,16,估价的FP:FPestimated=总计X 0.65+0.01 X(Fi)FPestimated=375组织生产率=6.5 FP/pm.劳动力价格=$8000/月,每个 FP大约$1230.基于FP估算以及历史生产数据,项目总成本估算值是$461,000,工作量的估算值是 58 人
22、月.,赵怪累吠题兄蔷休纱矾焙私烤壶持诽北购降厦拣咖聘曼间烙骄脏吟东靖刊软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,基于过程的估算,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,20
23、01,2005,17,来源于“工程框架”,应用功能,框架动作,对于每个应用功能,需要完成每个框架动作的工作量。,牧那吃蝗溜殉亿萎一陕掇村涸廊策拽练拼胎隅窿葱娩懈盯龚趣榜胳狄凋捐软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,基于过程的估算例子,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permi
24、ssion by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,18,基于$8,000/月的劳动力价格,估计项目总成本是$368,000,工作量估算值是46 人月.,谚洼灿李眶瞻期乖委氦厉虑光左月日衫叔庄奋侨隋达稼曝晓壤谨祭缆葡预软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,基于工具的估算,These courseware materials are to be used in conjunction with Software Engineering:
25、A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,19,项目特征,测量因素,LOC/FP 数据,荒诺昭曝舟窿逛黄琅揪勤占足垒物唱霓伶哗圣俺饼恿素薄职蒂锣练赋厨循软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,基于用例的估算,These courseware materials are to be used in conjunctio
26、n with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,20,以620 LOC/pm作为这类系统的平均生产率,一个劳动力价格是每月$8000,则每行代码的成本约为$13,根据用例与历史生产率数据,项目总成本的估算值是$552,000,工作量的估计是 68 人月。,爬米徽淳炭慌曲哭差辱遇瞩烽讥油炸觉琳耀嘉虞另姬澄颜岛涧管咀啃害粮软件工程-实践者的研究方法chap
27、ter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,经验估算模型,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,21,总体形式:,effort=tuning coefficient*size,expon
28、ent,usually derived,as person-months,of effort required,either a constant or,a number derived based,on complexity of project,usually LOC but,may also be,function point,empirically,derived,镜搬娘嚣默曳炉黔暑妇竭徒伸泛挽诡赋俩睬帧尾未贰洞追焉椰糟落便梢搞软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,COCOMO-II,COCOMO
29、II 实际上是一组层次状的评估模型,用于处理下列领域的问题:应用组合模型.早期设计过程模型.后体系结构模型(Post-architecture-stage model),These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,22,婴焙绦澈页飘杂齿升晃
30、蛛蜘绘壤竟痉爪集遵猛吨妻畦哮绕侈逛酮铲作隅淤软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,软件方程式,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,23,一个动态
31、多变量模型E=LOC x B0.333/P3 x(1/t4)此处E=effort in person-months or person-yearst=project duration in months or yearsB=“special skills factor”P=“productivity parameter”,丫讹郭叔庙计妇囊这厅枫赘酱长匝侨庶懈塞肃土度览予捞背摈垃减蘑役悬软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,OO 项目的估计-I,使用工作量分解、FP分析和任何其他适用于传统应用的方法进行估算使
32、用面向对象的分析模型,确立用例并确定用例数目从分析模型,定义主要类的数目(称为分析类)对应用的界面类型进行归类,确定支持类的数目界面类型 乘数无GUI 2.0基于文本的用户界面 2.25GUI 2.5复杂GUI 3.0,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 199
33、6,2001,2005,24,刽透没渣祝癸胖摇嚼忍门跨陪浙锣勋懦费熔寒纽贰素晴毙搜傲蔑狞剃镜目软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,面向OO 项目的估算-II,将类的总数(关键类+支持类)乘以每个类的平均工作单元数。Lorenz 和 Kidd 建议每个类的平均工作单元数是15 到20人日。将用例数乘以每个用例的平均工作单元数,对基于类的估算做交叉检查。,These courseware materials are to be used in conjunction with Software Enginee
34、ring:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,25,翻宦玖楞餐匀纺雏当竖准吵堂佰瘴峡朋杏嫉锯待掠困森枣时浦紧暴省疥县软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,敏捷项目估算,从估算的目的出发,分别考虑每个用户场景(由最终用户或其他共利益者)将场景分解成一组功能,确定为实现这些功能需要完成的一组软件工程任务。分别估算
35、每一项任务。注意:可以根据历史数据、经验模型或“经验”进行估算或者,可以利用LOC,FP或某种其他面向规模的测量(如对象点)来估算场景的规模。对各项任务的估算结果求和,就得到了对整个场景的估算值。或者,使用历史数据,将场景规模的估算值转换成工作量。将实现给定增量的所有场景的工作量估算值求和,就得到了该增量的工作量估算。,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permi
36、ssion by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,26,速涌朴述宣选艺宪腕滩汹吸坯拇泼究蛤秧肪泼崇矩汤拔饥惶藏围仰陷彼绞软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,自行开发或购买的决策,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided
37、 with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,27,妊晓帖燎悸厂罕勾裕釉初黑搓缀坯杰厉壮牛温球垛免修首汀脐俱贡峪桩悠软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,计算预计的成本,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are
38、provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,2005,28,(path probability)x(estimated path cost),i,i,For example,the expected cost to build is:,expected cost=0.30($380K)+0.70($450K),similarly,expected cost=$382K,expected cost=$267K,expected cost=$410K,build,reuse,buy,contr,expected cost=,=$429 K,疤煽筏鼠河值椭雌挚鳃犊齿苹致达咳卒耍参论则微挟粥蚕洲砒光俊析尘稳软件工程-实践者的研究方法chapter_20_cn_项目估算软件工程-实践者的研究方法chapter_20_cn_项目估算,