Transferred from: Model-engineering implementation and expansion (Design Mode C)
Http://www.cnblogs.com/callwangxiang/
Self-Test
1,Calculation of inflation rate is generally applicable3This includes the use of the Consumer Price Index (CPI), Producer Price Index (PPI),GDPThe contraction index is calculated using the following formula:
π _ T = (cpi_t-CPI _ (t-1)/cpi _ (t-1)
π _ T = (ppi_t-PPI _ (t-1)/PPI _ (t-1)
π _ T = (gdp_t-GDP _ (t-1)/GDP _ (t-1) (T: generally expressed as the year)
BecauseGDP,PPI,CPIThe acquisition and production of data is very complex, but in order to develop the calculation module of inflation rate, you cannot expect the calculation modules of these three indicators to be completed before you, use the template method described in this chapter to design a computing interface and pass unit test verification.
2. one OA the project needs to process many different files, and all types of file entities have implemented IDOC Ument interface. Now you need to define an intermediate processing object ( broker ), the intermediate processing object is responsible for receiving and issuing documents.
UseEvent (Event)As an operation template for receiving and sending texts, describe an abstractBrokerThe object template is verified by the test Type and unit test.