1. GitHub project
https://github.com/Littlehui3/wc
2. with tables
PSP2.1 |
SUMMARY |
Plans to complete the required time (min) |
The actual time required for completion (min) |
Planning |
plan |
45 |
50 |
Estimate |
It estimated that the task requires much time and planning generally work steps |
45 |
50 |
Development |
Develop |
880 |
740 |
Analysis |
Needs analysis (including learning new technologies) |
60 |
30 |
Design Spec |
Generate design documents |
30 |
- |
Design Review |
Design review (and colleagues reviewed the design documents) |
10 |
- |
Coding Standard |
Code specifications (development of appropriate norms for the current development) |
40 |
40 |
Design |
Specific design |
60 |
80 |
Coding |
Specific coding |
400 |
510 |
Code Review |
Code Review |
30 |
30 |
is |
Test (self-test, modify the code, submit modifications) |
250 |
200 |
Reporting |
report |
450 |
180 |
Test Report |
testing report |
300 |
370 |
Size Measurement |
Computing workload |
30 |
- |
Postmortem & Process Improvement Plan |
Later summarized, and process improvement plan |
60 |
80 |
Summary |
total |
2690 |
2410 |
3. Problem-solving ideas
I began to think a moderation may need to handle multiple statements, consider using a thread pool to handle requests for each user, both to each user's request is packaged into a request class, but also effectively prevent the decrease in efficiency caused by too many threads. Taking into account the console and graphical interfaces require separate from the business logic thread management, we designed a RequestManager to manage all requests. Statistics spaces, the number of lines, number of characters are very similar, separated into three categories, to achieve Counter interface, making their structure more standardized, but also makes it easier to add new Counter, scalability is improved.
The actual development process, from start to achieve three Counter let Request processing options and file, the code is a little long, so two separate methods to handle options and file separately.
Documentation, support relative path, an absolute path, the current directory under the same type of file (* .txt * .c) input
Options, support -l, -w, -c, -s
Figure 4. Relationship Class