四则运算个人开发流程-计应192第一组张明辉
1,计划
加减乘除四则运算
2,设计复审
3,代码规范
符合java代码规范
4,具体设计
5,具体编码
package Yunsuan;
import static org.junit.jupiter.api.Assertions.*;
import java.util.ArrayList;
import org.junit.jupiter.api.Test;
import org.w3c.dom.TypeInfo;
import com.sun.jdi.Type;
class MIXsss {
static int randomMath;
static String[] symbol = { "+", "-", "*", "/" };
static int symbolNumber;
static int temp;
static int temptemp;
static double result = 0;
public static void aa() {
String a = "10";
// 生产随机数字
temptemp = (int) (Math.random() * 100000) % (101);
String temptemp02 = "";
for (int i = 0; i < 5; i++) {
randomMath = (int) (Math.random() * 100000) % (101);
symbolNumber = (int) (Math.random() * 100000) % (4);
if (i == 4) {
temptemp02 = temptemp02 + randomMath;
} else {
temptemp02 = randomMath + symbol[symbolNumber] + temptemp02;
}
}
//TOO 根据分片的字符串取得值进行结果计算
String[] aa = temptemp02.split("\\+");
for (int i = 0; i < aa.length; i++) {
String[] bb = aa[i].split("-");
for (int j = 0; j < bb.length; j++) {
String string = bb[j];
System.out.print(string + " ");
}
}
System.out.println(temptemp02 + "=" + result);
}
@Test
void test() {
aa();
}
}
| PSP阶段 | 实际花费时间百分比 | 估计花费时间百分比 |
| 计划 | 8 | 6 |
| 明确需求和其他相关因素,估计每个阶段的时间成本 | 8 | 6 |
| 开发 | 79 | 86 |
| 需求分析 | 7 | 8 |
| 生成设计文档 | 4 | 8 |
| 设计复审(和同事审核设计文档) | 4 | 4 |
| 代码规范(为目前的开发制定合适的规范) | 2 | 3 |
| 具体设计 | 16 | 13 |
| 具体代码 | 31 | 30 |
| 代码复审 | 13 | 10 |
| 测试(自测,修改代码,提交修改) | 12 | 10 |
| 报告 | 8 | 8 |
| 测试报告 | 3 | 3 |
| 计算工作量 | 2 | 2 |
| 事后总结,并提出过程改进计划 | 3 | 3 |
浙公网安备 33010602011771号