Object-oriented programming - Module IV Course summary


One architecture • This unit twice a job

This architecture means in two operations:

  • The first job using FIG class - Class - framework elements other classes design and coding

    on the complexity of the control codes, MyUmlInteractionadding UmlElementmethod, due to the need to control different types of UmlElementorder of addition, the present method results in v ( G) high.
  • The second operation taking into account the requirements of the job, the state diagram, a sequence diagram between a class and FIG contact resistance is small, so that the three separately treated. The MyUmlGeneralInteractionintegrated for three different images ( stateMap, sequenceMap, classMapoperating instructions), by the class diagram of the complete operation of their needs. In the specific implementation, also used the Lazy update caching mechanism to optimize query time.

    In the control code complexity, I UmlGeneralInteractionclass, the input UmlElement(G) was too classification treatment, the present method results in v. The complexity of the control class to the class diagram of the need to do something no good split, resulting in a high degree of complexity, affecting the overall code quality.

· Evolution II architecture design and understanding of OO methods

OO design work of four units, is a framework increasingly clear process. From A. polynomial derivation job data structure when writing, can be gradual separation problems, analyzed one by one, to the final architecture code can be more clearly reflect thought processes. Be able to use some design patterns to analyze and solve problems. In a related operation of the second unit, I saw a simple multi-threaded architecture program how it should be, the importance of the program and function block decoupling program for subsequent development.

In a particular job of the third unit, some students see the same group of architecture is not very good, which is the follow-up repair BUG is very unfriendly. It also reminded me, whether it is a good framework for program correctness or for the subsequent improvement programs are very necessary. Looking at his job in the process, we could see some of the names in front of the process variables is not very standard, also in the process of encoding the variable name does appear this kind of misuse bug, which also remind myself programming in the future process, variable names must be hierarchical naming standardization in the design is complete, to prevent misuse.

Evolution triple-tested

Testing is part of the entire job is complete the process time consuming, but also to ensure the correctness of the more important part. In OO learning throughout the semester, I used to test methods have major human eye Review + Junit testing + automated test these methods, from static to dynamic, from small-scale to large-scale, pressure data, boundary data, to ensure that the code security.

Static Testing

Static testing is an important test code logic means, in the encoding process, to determine the specific usefulness of each method and its specification is prepared according to the Javadoc or JML, and then at the individual checks its implementation meets requirements. It should be noted that in the encoding process, layer by layer should regulate the use of the variable name, while facilitating the inspection, because the variable is prevented from occurring due to misuse failure.

Small yellow duck Debug is a very effective method in the testing process, but some time, to see their own program in the process is not easy to find errors, or need to be tested by writing data to find the bug.

Junit test

Unit testing is also very important to ensure the quality of the code. , You can test the correctness of the code coverage by writing unit tests, sample some of the boundaries of data can ensure that the code is in line with our requirements.

In the process of personal writing unit tests, you may often feel a little dull and boring, so will lazy to some extent, and the error is generated between these lazy inadvertently. For example, in the third operation of the third unit JML, I expand on the basis of the original code on the new features in use Junit testing process, I prepared for the newly added code to test data, without testing the original code is correct. However themselves in the encoding process, the original code has been modified to a line, it is this line that led to a strong test in 20 points and only two are correct.

automated test

Automated testing of a little of its high efficiency, the test of randomness can involve two or more ways to do better in less than a point to add. Automated test due to the larger size of the data it generates, can be constructed more complex test model, the test can be performed better code performance.

In the four units of the semester OO course, I use the students / own test script code was tested, fully automated test, basically to ensure the correctness of the overall code. In the elevator operation, the use of automated testing to draw a diagram elevator in the life cycle, to get the elevator scheduling performance was more intuitive feel.

Automated testing also has some disadvantages, one is in the process of data generated, if the resulting data is not comprehensive enough, you can not properly check the entire contents of the program; the second is automated data generated some data may not be obtained "strongest", ie testing program is still not complete.

Store-course harvest

OO This course is like a stepping stone for us to open the door of OOP. During the course carried out in many ways a lot of knowledge, because the rush of time, the pressure of work per week, have not had time to learn, it is very regrettable. But OO this course gave us a broad overview of the general framework of OOP, in the course of their own to explore and further explore the future, I believe that the accumulation of this semester, the harvest are able to provide good help. I believe OO curriculum more students also want the church method, to learn more knowledge of it.

Wu · OO Program Improvement

OO in the course of this semester, in terms of knowledge or ability are with the code progress.

For the future OO course, we hope that teachers were able to explain more details of the design mode. We want to be able to provide more courses set some code routines to help students to learn better ways to write OO code. In testing, the course can be set to provide some more tutorials Junit test methods such as better able to help students test the code.


OO courses a semester passed quickly, and now is the time to complete the look eyeful when the winter preparatory work.
This semester, experiments and operations, gain a lot.
Thanks to the teachers and teaching assistants seniors hard work.

Guess you like

Origin www.cnblogs.com/lebway/p/11075093.html