https://github.com/ljjy/personal-project
PSP2.1 | Personal Software Process Stages | 预计耗时(分钟) | 实际耗时(分钟) |
---|---|---|---|
Planning | 计划 | ||
·Estimate | · 估计这个任务需要多少时间 | 600 | 800 |
Development | 开发 | ||
·Analysis | · 需求分析 (包括学习新技术) | 120 | 180 |
·Design Spec | · 生成设计文档 | 20 | 20 |
·Design Review | · 设计复审 | 30 | 20 |
·Coding Standard | · 代码规范 (为目前的开发制定合适的规范) | 30 | 20 |
·Design | · 具体设计 | 60 | 40 |
·Coding | · 具体编码 | 240 | 360 |
·Code Review | · 代码复审 | 60 | 60 |
·Test | · 测试(自我测试,修改代码,提交修改) | 60 | 120 |
Reporting | 报告 | ||
·Test Repor | · 测试报告 | 60 | 60 |
·Size Measurement | · 计算工作量 | 20 | 20 |
·Postmortem & Process Improvement Plan | · 事后总结, 并提出过程改进计划 | 60 | 90 |
合计 | 700 | 990 |
trie_node* FrequentWordCount()
{
int flag = 1;
sort(Words,Words+ct);
trie root = create_trie_node();
for(int i=0;i<ct;i++)
{
trie_insert(root,Words[i]); //建立字典树
}
for(int i=0;i<ct;i++) //遍历单词数组
{
int ct = trie_search(root,Words[i]); //搜索该单词
fqtWord.c = ct;
fqtWord.word=Words[i];
if(q.size()<10) //维护优先队列
{
q.push(fqtWord);
}
else
{
q.push(fqtWord);
q.pop();
}
}
while(!q.empty()) //倒序保存优先队列
{
fqtWord = q.top();
str[d] = fqtWord.word;
ans[d] = fqtWord.c;
d++;
q.pop();
}
return root;
}
TEST_CLASS(Up_low_wordEuqalText)
{
public:
TEST_METHOD(TestMethod1)
{
// TODO: 在此输入测试代码
int count_up = CharacterCount("test1.txt"); //全小写文件
int count_low = CharacterCount("test2.txt"); //大小写混杂文件
Assert::IsTrue(count_up == count_low); // 两个返回值应该相等,测试通过
}
};
文件打不开
if (!file.is_open())
{
cout << "文件无法打开" << endl;
//return 0;
}
原文:https://www.cnblogs.com/fdhyj/p/9678151.html