School ICT Self Study

Modular Design and Programming Paradigms

0

  1. What is top-down design in problem-solving?

  2. What is the role of structure charts in modular design?

  3. How does stepwise refinement improve algorithm development?

  4. What are the key differences between imperative and declarative programming paradigms?

  5. Name one advantage and one disadvantage of object-oriented programming.

Spread the love
Ruwan Suraweera Changed status to publish 2 days ago
0

Answers and Descriptions:

  1. Answer: Top-down design breaks a complex problem into smaller, manageable sub-problems.
    Description: It starts with the main goal and divides it into subsystems or modules, making the problem easier to solve and code systematically.

  2. Answer: Structure charts illustrate the hierarchical organization of modules in a system.
    Description: They show how modules interact, with the main module at the top and sub-modules below, aiding in visualizing the system’s structure.

  3. Answer: Stepwise refinement breaks a problem into smaller steps, refining each until it’s solvable.
    Description: This iterative process ensures each module is detailed and functional, reducing complexity and errors during implementation.

  4. Answer: Imperative programming specifies how to achieve a result with step-by-step instructions; declarative programming specifies what the result should be without detailing how.
    Description: Imperative (e.g., Python’s loops) focuses on control flow, while declarative (e.g., SQL queries) emphasizes the desired outcome, often being more concise but less flexible for procedural tasks.

  5. Answer: Advantage: Reusability through classes/objects; Disadvantage: Steeper learning curve.
    Description: Object-oriented programming allows code reuse via inheritance and encapsulation but requires understanding complex concepts like polymorphism, which can be challenging for beginners.

Spread the love
Ruwan Suraweera Changed status to publish 2 days ago
You are viewing 1 out of 1 answers, click here to view all answers.
Write your answer.