Tuesday, January 14, 2014

         Any computing problem can be solved by executing a series of actions in a specific order.
 A procedure for solving a problem in terms of

                1.  the actions to be executed and
                2.  the order in which these actions are to be executed

is called an algorithm. The example that follows demonstrates the importance of correctly

specifying the order in which the actions are to be executed.
     Consider the “rise-and-shine algorithm” followed by one junior executive for getting
out of bed and going to work: (1) get out of bed, (2) take off pajamas, (3) take a shower, (4)
get dressed, (5) eat breakfast, (6) carpool to work. This routine gets the executive to work
well-prepared to make critical decisions.
     Suppose that the same steps are performed in a slightly different order: (1) get out of
bed, (2) take off pajamas, (3) get dressed, (4) take a shower, (5) eat breakfast, (6) carpool
to work. In this case, our executive shows up for work soaking wet.
     The importance of correctly specifying the order in which actions appear applies to
computer programs, as well. Program control refers to the task of ordering a program’s
statements correctly. In this chapter, we begin to investigate the program control capabili-
ties of C#.

0 comments:

Post a Comment

Subscribe to RSS Feed Follow me on Twitter!