Which statement best describes a modular design approach?

Study for the End of Year 8 Computer Science Test. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

Which statement best describes a modular design approach?

Explanation:
Modular design means breaking a program into separate, interchangeable components that communicate through clear interfaces. Each module handles its own responsibilities and hides its internal workings, exposing only what other parts of the system need to use. This makes the code easier to understand, test, and maintain, and it lets you replace or reuse modules without touching the rest of the program as long as the interface stays the same. Think of it like building with Lego: each piece has a specific shape and connectors, so you can swap a piece for another that fits the same connection and still have the same overall structure. In software, that interchangeable nature comes from well-defined interfaces that specify inputs, outputs, and how to call a module’s functions. The approach described by trying to keep everything in one file, duplicating code across modules, or relying on global variables for communication undermines modularity. A single-file design makes it hard to manage as the project grows; duplicating code wastes effort and creates maintenance headaches; and global variables couple modules together in invisible ways, making changes risky and difficult to trace.

Modular design means breaking a program into separate, interchangeable components that communicate through clear interfaces. Each module handles its own responsibilities and hides its internal workings, exposing only what other parts of the system need to use. This makes the code easier to understand, test, and maintain, and it lets you replace or reuse modules without touching the rest of the program as long as the interface stays the same.

Think of it like building with Lego: each piece has a specific shape and connectors, so you can swap a piece for another that fits the same connection and still have the same overall structure. In software, that interchangeable nature comes from well-defined interfaces that specify inputs, outputs, and how to call a module’s functions.

The approach described by trying to keep everything in one file, duplicating code across modules, or relying on global variables for communication undermines modularity. A single-file design makes it hard to manage as the project grows; duplicating code wastes effort and creates maintenance headaches; and global variables couple modules together in invisible ways, making changes risky and difficult to trace.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy