OO fourth semester summary Summary &

A fourth cell architecture design

This job is twice UML class diagram, a sequence diagram, a state diagram of the parsing.

 

The first job is only parsed UML class diagram, and some basic query operation, the second operation sequence state diagram is introduced, an increase of the query sequence state diagram of FIG class also achieved effectiveness check operation.

 

These two work in the design of architecture I did not do a good job. I simply need to store some queries use HashMap. There is no clear understanding of the architecture of the toner, the design of the program behind the second job expansion has caused tremendous obstacles, but the program readability is very poor, do really bad.

 

The first job requires UML class diagram in accordance with the level package, including classes, interfaces, operations, relations;

The second job can be extended to realize for the first time on the basis of architecture

 

Two, four cell architecture and method for understanding the evolution of OO

 

The first unit operation is simplified polynomial derivation, the main focus primarily on the recognition processing regular expressions, I designed expression object, item object, the object factor, have achieved their derivation operation . Pits this job recognition processing unit that various error polynomial. This unit is designed for architecture and not too much attention, good architecture is not clear page design program for scalability, readability, debug what kind of benefits

 

The second unit is elevator series, are a fool elevator (advanced first-served policy, and not the way incidentally), intelligent elevator (for the first time realized the way piggyback basis), multiple smart elevators scheduling; the first job did not pay attention architecture design, no lift to achieve the object, on the use from the request queue scheduler sequentially fetch request, is output. Establish a second job scheduler object and lift objects designed three threads: input thread, thread scheduler, elevator thread two request queue (first entry of the thread is threaded into the request input, taken from the scheduler request, in fact, the first time the job queue elevator (user request queue), there is a lift piggyback request of the original request into a queue and perform a piggyback request to take out the original request and continue (named elevator request queue)). The scheduler thread constantly scans the request queue and lift the state of comparison to see whether incidentally, if they meet the request put into the elevator request queue, if the queue waiting for the air conditioning of the thread. Elevator lift taken from the request queue thread request execution, if the queue is empty the thread waits for the elevator. The third elevator lift operation is to achieve three functions have piggybacked on the way, some of the properties of these three elevators are not the same (velocity, stopping floor, the largest seating capacity). The job can not reconstruction, but the elevator class needs to change it, add some attributes: speed of movement, stopping floor, the largest seating capacity. Other design and operation as the second elevator. In order to satisfy the transfer request, the request input thread when inserted, will not direct a request into several segments request, completes the execution of the request, the request will be added next section request queue scheduling performed by the scheduler.

 

The third unit operation is relatively simple, is to write a program in accordance with the JML specification language, is relatively simple. Architectural design work of this unit do better, makes the program very easy to expand, JML specification language to a common standard way to express the detailed design of the classes and methods. This difficulty lies in the unit and not on the shortest path search algorithm to the memory map (with or without weights rights).

 

Finally, a unit is to get various elements (e.g., class diagrams: classes, interfaces, relationships ...) abstract, and perform various query operations.

Third, understand and practice test

The first unit test: the use of their anomalies encountered in the process of testing their own procedures to test the design data, is some borderline cases for testing.

The second unit of the bug occurs mostly because of small problems on various programs may not lead to the end of the thread, the situation appears infinite loop, this situation requires a more clearly architectural design program, debug the method used to set breakpoints

The third unit in accordance with specifications write code using Junit test.

Fourth means for different query different test scenarios are designed, for example, query operation interface, implementation scenarios include inherited (between interfaces, a class implements multiple interface by multiple inheritance, the subclass between the parent inherit). It is easy to identify the problems of their own program.

Fourth, the curriculum harvest

Skilled java language ,, and have a clear understanding of object-oriented;

There are more in-depth knowledge and understanding of the advantages of the program architecture design;

With more understanding of the program testing methods

Enhance programmability and debug capabilities

V. Recommendations

The difficulty can be measured appropriately strengthened in strong measure will often appear homogeneous bug, hoping to improve on the strong test data

Guess you like

Origin www.cnblogs.com/mujiangtao1234/p/11076572.html