POJ 2376 Cleaning Shifts 区间覆盖问题

用例点表达进度

识别用例的状态

根据生命周期要求,识别用例的状态及转移。

典型的如瀑布型,一般依次有如下状态:用例识别,用例确认,用例已设计,用例已编码,用例已测试。

采用测试驱动开发(TDD)的一个例子,依次状态:用例识别,已写测试用例,用例已编码,用例已集成,用例已测试。

最简化用例状态,依次状态:用例识别,用例已集成。

从以上例子可以看到,传统生命周期和敏捷方法都可以得到合适的状态转移图。

设定用例状态的完成度

完成度以百分比表示,表示与工作量成正比的完成程度,0%表示刚开始,工作量投入为0,100%表示全部已经完成,工作量已经全部投入。

对以上三种状态举例如下。

表5 用例状态完成度例子


瀑布型


采用测试驱动开发(TDD)的一个例子


最简化用例状态


状态


完成度


状态


完成度


状态


完成度


用例识别


20%


识别用例


30%


用例识别


30%


用例确认


30%


已写测试用例


60%


用例已集成


100%


用例已设计


45%


已编码


80%


用例已编码


80%


已集成


90%


用例已测试


100%


已测试


100%

计算折算未完成用例点数UFUCP

为对比进度,将过程中的用例完成情况以折算已完成用例点(FUCP - Finished Use Case Point)来表示,计算公式是 ∑各状态用例数量*用例权重*完成度。以此可计算挣值分析中的挣值。

折算未完成用例点数UFUCP = UCP – FUCP,以此可绘制Scrum中的燃尽图,UFUCP - Unfinished Use Case Point。

一个实际的例子,采用TDD,见表如下:

表6 FUCP例子


模块


用例

大小


各状态的用例数量


U

C

P


折算

已完

成用

例点


折算未

完成用

例点数


识别

用例


已写

测试

用例


已编


已集成


已测试


录入



0


5


1


0


0


75


55.5


19.5



0


1


1


1


0



0


0


0


1


0


查询



5


8


2


0


0


250


146.5


103.5



3


6


1


0


0



0


2


3


0


0


总计


325


202


123

利用折算未完成用例点数UFUCP绘制燃尽图

根据3.3,定期计算UFUCP,可以得到用例点燃尽图,进而直观的管理进度。如图1所示。

图1 用例点燃尽图示例

以上可以看出对于处于过程中、未完成的用例,可以反映其进展,避免了要等到用例实现后才能判断进度,提高了进度管理的准确性和及时性。

时间: 2024-10-31 07:09:16

POJ 2376 Cleaning Shifts 区间覆盖问题的相关文章

POJ - 2376 Cleaning Shifts 贪心(最小区间覆盖)

Cleaning Shifts Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day into T shifts (1 <= T <= 1,000,000

POJ 2376 Cleaning Shifts (贪心,区间覆盖)

题意:给定1-m的区间,然后给定n个小区间,用最少的小区间去覆盖1-m的区间,覆盖不了,输出-1. 析:一看就知道是贪心算法的区间覆盖,主要贪心策略是把左端点排序,如果左端点大于1无解,然后, 忽略小于1的部分(如果有的话),再找最长的区间,然后把这个区间的右端点作为下次寻找的起点, 再找最大区间,直到覆盖到最后. 注意:首先要判断好能不能覆盖,不能覆盖就结束,有可能会提前结束,也要做好判断,我就在这WA了好几次, 悲剧...其他的就比较简单了,不用说了. 代码如下: #include <ios

POJ 2376 Cleaning shifts 贪心 基础题

Cleaning Shifts Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13042   Accepted: 3373 Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one co

[POJ 2376] Cleaning Shifts

Cleaning Shifts Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12874   Accepted: 3331 Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one co

poj 3171 Cleaning Shifts(区间的最小覆盖价值)

Cleaning Shifts Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2743   Accepted: 955 Description Farmer John's cows, pampered since birth, have reached new heights of fastidiousness. They now require their barn to be immaculate. Farmer J

poj 2376 Cleaning Shifts(贪心)

Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day into T shifts (1 <= T <= 1,000,000), t

POJ 2376 Cleaning Shifts(轮班打扫)

Time Limit: 1000MS   Memory Limit: 65536K [Description] [题目描述] Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided t

POJ 2376 Cleaning Shifts (贪心)

Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day into T shifts (1 <= T <= 1,000,000), the first bei

ACM学习历程——POJ 2376 Cleaning Shifts(贪心)

Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day into T shifts (1 <= T <= 1,000,000), t