Page 179 - DCAP507_SYSTEM_SOFTWARE
P. 179

Unit 11: Programming Languages Concept (II)




          approach. On the other hand, bottom level modules provide the basic operation used by higher  Notes
          level modules. It is therefore important to ensure that these bottom level modules are working
          correctly before these are used by other modules. This suggests that the development should
          proceed in a Bottom up manner. As both issues are important in a large project, so it may be best
          to follow a combination approach for such systems.
          Self Assessment


          Fill in the blanks:
          1.   A system/program is considered modular if it consists of ......................... modules so that
               each modules can be separately implemented, and a change in one module has minimal
               impact on other modules.

          2.   A set of related procedures with the data they manipulate is called a .........................
          3.   A ......................... approach (Pure top-down or pure bottom-up) starts by identifying the
               major modules of the program.
          4.   A ......................... approach starts with designing the most basic or primitive module and
               proceeds to higher level module that use these lower level components.

          5.   In practice, in large systems, a combination of two approaches is used, called as .........................
               approach.

          11.2 Asynchronous Operation


          An asynchronous operation that utilizes the IAsyncResult design pattern is  executed as  two
          methods  named  BeginOperationName  and  EndOperationName  that  start  and  end  the
          asynchronous operation OperationName  correspondingly.


                 Example:  The  FileStream  class  offers  the  BeginRead  and  EndRead  methods  to
          asynchronously read bytes from a file. These methods execute the asynchronous edition of the
          Read method.

          After calling BeginOperationName, an application can carry on implementing instructions on
          the calling thread while the asynchronous operation occurs on a dissimilar thread. For every
          call to BeginOperationName, the application should also call EndOperationName to obtain the
          results of the operation.




              Task  Make distinction between BeginOperationName and EndOperationName.

          11.2.1 Beginning an Asynchronous Operation

          The BeginOperationName method starts asynchronous operation OperationName and returns
          an object that executes the IAsyncResult interface. IAsyncResult objects accumulate information
          regarding an asynchronous operation. The following table displays information regarding an
          asynchronous operation.










                                           LOVELY PROFESSIONAL UNIVERSITY                                   173
   174   175   176   177   178   179   180   181   182   183   184