PSP2.1 | Personal Software Process Stages | 预估耗时(分钟) | 实际耗时(分钟) |
---|---|---|---|
Planning | 计划 | 20 | 20 |
? Estimate | ? 估计这个任务需要多少时间 | 240 | 500 |
Development | 开发 | 60 | 120 |
? Analysis | ? 需求分析 (包括学习新技术) | 60 | 120 |
? Design Spec | ? 生成设计文档 | 30 | 80 |
? Design Review | ? 设计复审 | 5 | 10 |
? Coding Standard | ? 代码规范 (为目前的开发制定合适的规范) | 10 | 20 |
? Design | ? 具体设计 | 10 | 20 |
? Coding | ? 具体编码 | 60 | 120 |
? Code Review | ? 代码复审 | 10 | 20 |
? Test | ? 测试(自我测试,修改代码,提交修改) | 10 | 20 |
Reporting | 报告 | 20 | 25 |
? Test Repor | ? 测试报告 | 10 | 15 |
? Size Measurement | ? 计算工作量 | 5 | 5 |
? Postmortem & Process Improvement Plan | ? 事后总结, 并提出过程改进计划 | 10 | 10 |
合计 | 585 |
我通过上网的方式了解到,小学一年级数学有如下的几个特点:
经过分析,我认为,这个程序应当:
算法应该是10以内
判断数据是否符合要求,包括数据类型
package com.java315;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.util.Scanner;
import java.util.Random;
public class MathExam315 {
public static void save(String[] a,String[] b) throws IOException{
File file=new File("out.txt");
BufferedWriter bw=null;
try {
bw=new BufferedWriter(new FileWriter(file));
} catch (IOException e1) {
e1.printStackTrace();
}
if(!file.exists()){
try {
file.createNewFile();
}
catch (IOException e) {
e.printStackTrace();
}
}
for(int i=0;i<b.length;i++) {
try {
bw.write(b[i]);
bw.newLine();
bw.flush();
}
catch (IOException e) {
e.printStackTrace();
}
}
bw.newLine();
bw.flush();
for(int i=0;i<b.length;i++) {
try {
bw.write(a[i]);
bw.newLine();
bw.flush();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) throws IOException {
Scanner input=new Scanner(System.in);
System.out.println("请输入正整数");
String z=input.next();
String regex="\\d+";
System.out.println(z.matches(regex));
String[] s=new String[Integer.valueOf(z)];
String[] s1=new String[Integer.valueOf(z)];
if(z.matches(regex)==false) {
System.out.println("有误,请重新输入正整数");
}else {
for(int i=0;i<Integer.valueOf(z);i++) {
Random q=new Random();
int a1=q.nextInt(2);
int a2=q.nextInt(10);
int a3=q.nextInt(10);
if(a1==1) {
s[i]="("+(i+1)+")"+" "+a2+"+"+a3+"="+(a2+a3);
s1[i]="("+(i+1)+")"+" "+a2+"+"+a3+"=";
}
if(a1==0) {
if(a2-a3>=0) {
s[i]="("+(i+1)+")"+" "+a2+"-"+a3+"="+(a2-a3);
s1[i]="("+(i+1)+")"+" "+a2+"-"+a3+"=";
}
if(a2-a3<0) {
s[i]="("+(i+1)+")"+" "+a3+"-"+a2+"="+(a3-a2);
s1[i]="("+(i+1)+")"+" "+a3+"-"+a2+"=";
}
}
}
}
save(s,s1);
}
}
请给出本次实验使用的代码规范:
请思考并记录你认为必要的测试点,并记录测试用例与测试结果
原文:https://www.cnblogs.com/l123456/p/9631748.html