Multiple choice .net

The methodology where code is broken into small, logical procedures is called:

  1. event-driven programming.

  2. functional programming.

  3. granular programming.

  4. modular programming.

  5. procedural programming.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To solve this question, the user should be familiar with different programming methodologies and their characteristics. The user should be able to identify the methodology where code is broken into small, logical procedures.

Option A: Event-driven programming is a programming paradigm where the flow of the program is determined by events such as user actions (clicking a button), sensor outputs, or messages from other programs/threads. This option is incorrect because it is not the methodology where code is broken into small, logical procedures.

Option B: Functional programming is a programming paradigm where programs are constructed by applying and composing functions. This option is incorrect because it is not the methodology where code is broken into small, logical procedures.

Option C: Granular programming is not a widely recognized methodology in programming. This option is incorrect.

Option D: Modular programming is a methodology where code is broken down into independent, interchangeable modules that can be used in different parts of the program. This option is the correct answer.

Option E: Procedural programming is a programming paradigm where the program is structured around procedures, or subroutines, that perform specific tasks. This option is similar to option D but does not emphasize the independence and interchangeability of the modules.

Therefore, the answer is: D. modular programming.

AI explanation

Breaking code into small, logical, reusable procedures/functions/modules is the defining trait of modular programming — each module handles one task and can be developed, tested, and reused independently. Procedural programming is the broader paradigm of sequential instructions/procedures but doesn't specifically emphasize decomposition into small logical units the way "modular" does. Event-driven programming structures flow around events/callbacks, functional programming avoids state/side-effects using pure functions, and "granular programming" isn't a standard recognized term — making modular programming the precise, textbook answer here.