The first phase of work summary (Java)

0 : Introduction

  This blog is mainly recorded think three weeks in the job, an error and a solution.

  In the third operation, we have achieved 100 points. But in the process of doing homework, problem-solving ideas are more troublesome, it is worth noting.

1 : operating procedure summary

  ① summarize knowledge iterative relationship between the three jobs

  1) The first job is mainly familiar for statements, switch statement, while statement, if statement and so on. Because behind the use of these statements must master.

  2) The second main job is to write algorithms and solution algorithm to calculate the date for the third time job laying the foundation.

  3) The third operation is an object-oriented practice, in the second operation algorithm has been largely resolved, the main thing is to shift from a process-oriented object-oriented thinking.

  How ② gradual transition from object-oriented to process-oriented work by

  1) According to the content of the course content and teacher learning Courses Online Mu in the classroom teaching, understand the difference between an object-oriented and process-oriented, and then to understand object-oriented features.

  In operation, easy to difficult job to be practiced using object-oriented.

  Problems and solutions encountered during the operation ③

  1) algorithm is too much trouble

  In the calculation under n days, at the beginning of my algorithm is a day to count, but running overtime, takes a long time. So I changed a way, minus the first year and then every day count.

  2) a null pointer error Java.lang.NullPointerException

  In doing third question, there is no new object, not initialized. Just be written according to the given topic map.

  3) In the parameterized constructor, no value is passed. Resulting in run out of the result is "0--0--0", found the problem, immediately corrected.

  4) When writing the fourth question, array bounds error.

  During commissioning and look carefully at the code and found before letting month number into the array, first stop abnormal numbers to enter, so before adding an if statement to prevent this error from occurring.

  ④ the proportion of time each takes to work

  First job: second job: job third time = 4 hours: 2 days: 6 days

  ⑤ logic programming process rigor of knowledge and lessons learned

  Logical rigor is very important! In the process of writing the title, we should take into account all aspects of the solution, if a case is not taken into account, the answer will be wrong, and then find a way to debug, test, and other inputs to find the problem.

  Lessons: Do you want before you write the code to sort out their own ideas, write them down, and then write the code!

2: OO Design experience

  ① for the comparison process to the object-oriented

 1) Object-oriented care about the main event, but the main event for the process does not care about, care about logic, etc.

  2) a class of objects, other types can not be used directly. Process for the global variable which can be used.

  3) a more object-oriented class has its own complete work, a class can only do this thing, not a class to finish this and do that. The process-oriented can do many things function.

  ② basic principles of object-oriented design understanding

  Single Responsibility Principle: A class can only carry out a job.

  Understanding of programming thinking ③OO

  Object-oriented, it can be a small event into a job, and then design a class that will do the job. In this case, if a functional error, the error can be part of another amendment, but little impact on the work of other classes.

3: understanding and practice tests

  ① the importance of testing for encoding quality

  Test points can test out in the end is what went wrong, and then modified for this aspect, the test improved the quality of coding.

  ② if you make design test cases, how would you do

  First, some abnormal data as a test point, then a test to each function.

4: Course harvest

  Harvest: by hand to think about problems and solutions, different from the process-oriented training. How to write code clarity. How long simplification of the code.

5: recommendations of the curriculum

  Some teachers want to share some information to improve problem solving.

 

Guess you like

Origin www.cnblogs.com/yaoyouxiuo/p/12600386.html