1. Question:Write the syntax of loop structure in pseudocode. 

    Answer

    DO WHILE (condition)
       instruction-1
       instruction-2
       ...
    END DO


    1. Report
  2. Question:Draw the generalized loop structure in flowchart. 

    Answer
    
    Figure: Generalized loop structure.

    1. Report
  3. Question:What is sequence structure in pseudocode? 

    Answer
    The sequence structure in pseudocode simply express in English what it is we want to do, in the order in which we want to do it.

    1. Report
  4. Question:Draw the generalized sequence structure in flowchart. 

    Answer
    
    Figure: Generalized sequence flowchart.

    1. Report
  5. Question:Draw the flowchart for sorting two numbers in descending order. 

    Answer
    
    Figure: Showing sorting between two numbers.

    1. Report
  6. Question:Draw the generalized CASE structure in flowchart. 

    Answer
    
    Figure: Generalized CASE structure.

    1. Report
  7. Question:Write down the advantage and disadvantage of Modular programming. 

    Answer

    Advantage:
    1.  As the size of each module are limited, the likelihood of errors is reduced.
    2.    Because the modules are independent, different programmers can work simultaneously on different parts of the same program. This reduces the times that elapses between beginning and completing a program.
    3.    In addition, a module can be radically changed without affecting other modules as long as its original function remains unchanged.

    Disadvantage:
    1.    The modular programming approach initially met with some resistance from programmers because it restricted their activities.
    2.    When portions of a program are allocated to different programmers, no one programmer can be said to “own” the program; instead, it belongs to a team.
    3.    Team programmers, for example, no longer have free rain to make up names to refer to data. Even when the programmer is free to create a name, there are frequently naming conventions that must be followed.
    4.    A more significant difficulty with the modular approach lay in determining exactly what constitutes a module.

    1. Report
  8. Question:Draw a structure chart for numbers problem (counting positive, negative and zero number). 

    Answer
    See your text book (Programming Practice and Techniques) at page 34, figure 2-7

    1. Report
  9. Question:Draw a structured flowchart on structure chart which is for counting positive, negative and zero number. 

    Answer
    See your text book (Programming Practice and Techniques) at page 44, figure 2-16

    1. Report
  10. Question:Draw a flowchart for sorting three numbers. 

    Answer
    See your text book (Programming Practice and Techniques) at page 52, figure 3-4

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd