Personal items (JAVA)

A, GitHub project address

https://github.com/Yuzeduan/WC

 

Two, PSP form

PSP2.1 Personal Software Process Stages Estimated time consuming (minutes) The actual time-consuming (minutes)
· Planning · Plan 50 55
· Estimate • Estimate how much time this task requires 30 30
· Development · Development 960 784
· Analysis · demand analysis  50 60
· Design Spec Generate design documents 30 43
· Design Review · Design Review  20 20
· Coding Standard · Code Specification 20 20
· Design · Specific design 150 50
· Coding · Specific coding 400 300
· Code Review · Code Review 60 50
· Test · Test (self-test, modify the code, submit modifications) 180 180
· Reporting · Report 120 120
· Test Report · testing report 60 60
· Size Measurement · Computing workload 20 20
· Postmortem & Process Improvement Plan · Hindsight, and propose process improvement plan 30 40
total   2010 2159

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Third, the problem-solving ideas

  • Understand the basic function, basic function is to calculate the number of rows in the file, such as the number of characters, so these basic functions should be packaged as tools invoked, then the outside world only need to determine the file query can be read into the calculation.
  • Understand advanced features, advanced features nothing more than to modify the parameters, so we only need to add two parameters to determine the conditions in the first step basis, you can do recursive queries as well as code calculates the output file here recursive query file, you can reuse the logic underlying functionality, so it can be pumped basis functions into a single method call.
  • Appreciated that the advanced features, the interface display is advanced functions, the function is performed before the command line display, so we will be understood to be two kinds of scheme problem, it is necessary to add a layer of logic, the parameters determined in the middle, Construction different solutions, but the outside world only need to pass parameters to call, do not need to care about the specific implementation, here it should be designed, unified program class inherits the parent class abstract class, when future expansion solutions, only modify the logic for an intermediate layer is at least part of the code can be realized.
  • Programs should also prompt some unreasonable input, entered incorrectly.

 

Fourth, the design and implementation process

  1. MAIN categories: the entrance to the program, simply call logic layer method, parameters can be passed, the next logical layer tools to be treated.
  2. service layer: abstract a generic program abstract class, it creates two instances of class inheritance, is a command-line operation, an operation of the interface. Manager to create a management class to obtain the corresponding class of solutions, MAIN incoming class parameters, its judgment, what programs, for example, the command line, then return to the command line instance of the class, a command-line invocation to resolve. In the embodiment corresponding class, determining different parameters, the method calls the underlying tools, obtaining a value corresponding to
  3. The underlying instrument implementation class: read the file, count the number of lines in the file, words, etc., this has nothing to do with the project business tool, it can be pumped into util class.
  4. If, after the interface to show, you need a class interface, such conduct by the interface solution to create a class, it invokes tools to get information, to fill the View class on display

Fifth, the results of the proceedings

1. Basic functions

 

 

2. Advanced Features

Wildcard support files, recursive queries subfolders of

 

 

3. Advanced Features

Select a document

 

4. anomalies

 

 

5. test file

 

 

 VI Summary

Write this personal project, it has gone through a development process, from design, budget, development and testing process, learned a lot about the idea of ​​software engineering, in fact, is not difficult to realize the function, while the module is designed, all cases consider sound is difficult. In the development process, we should mention that, when using the command line, because it is run directly by the compiler, so we chose to integrate the compiler command line parameter passing, no operation is performed using the command line, I believe that this effect little. Although realization is a small feature, but still want to want to know all aspects, starting from the design, build framework, will achieve small features, follow the principle of open and close, so easy to expand, the program has a better robustness.

 

Guess you like

Origin www.cnblogs.com/allenyuaaaa/p/11575535.html