Question
Download Solution PDFThe characteristics of modern programming are:
A. Each module should do only one thing.
B. Communication between modules is allowed only by a calling module.
C. Communication can take place directly between modules that do not have calling - called relationship.
D. All modules are designed as single-entry, single exit systems using control structure.
Choose the correct answer from the options given below:
Answer (Detailed Solution Below)
Option 2 : A, B & D only
Detailed Solution
Download Solution PDFThe correct answer is Option 2.
Key Points
- Each module should do only one thing: This principle is often referred to as the Single Responsibility Principle, which is a part of the SOLID principles of object-oriented design. It ensures that a module or class has only one reason to change, thereby making the code more maintainable and understandable.
- Communication between modules is allowed only by a calling module: This promotes loose coupling and high cohesion between modules, meaning that modules are independent and interactions are limited to well-defined interfaces. This makes the system more modular and easier to test and maintain.
- All modules are designed as single-entry, single-exit systems using control structure: This refers to structured programming, where the flow of control is limited to a few well-defined constructs, such as loops and conditionals. This makes the code easier to follow and reduces the risk of errors.
Additional Information
- Adhering to these principles allows for better modularization of code, making it easier to understand, maintain, and scale.
- It also helps in isolating bugs, as each module can be tested independently.
- Good module design often follows the principle of information hiding, where the internal workings of a module are hidden from other modules.
- These principles are fundamental to modern software development practices, including Agile and DevOps methodologies.