Modular Code (OCR A-Level Computer Science): Flashcards
Practise the cards
14 cards from this deck
ShowHide
Practise the cards
14 cards from this deck
What is modular code?
What is modular code?
Program divided into smaller, self-contained units called modules
Three key enhancements of modular code
Three key enhancements of modular code
Readability, reusability, and maintainability
Four types of modules
Four types of modules
Functions, classes, procedures, files or libraries
Independence characteristic of modules
Independence characteristic of modules
Each module functions independently and interacts with others through well-defined interfaces
Single Responsibility principle in modules
Single Responsibility principle in modules
Each module performs one specific task
Encapsulation in modular code
Encapsulation in modular code
Internal workings hidden, only necessary functionality exposed
Maintenance benefit of modular code
Maintenance benefit of modular code
Changes can be made to individual modules without affecting entire program
Collaborative development benefit
Collaborative development benefit
Different team members can develop different modules simultaneously
Debugging benefit of modular code
Debugging benefit of modular code
Errors isolated within specific modules
Required for each module design
Required for each module design
Clear input and output
How modules interact with each other
How modules interact with each other
Through well-defined interfaces
Over-modularisation mistake
Over-modularisation mistake
Too many small modules makes program harder to understand
Tightly coupled modules problem
Tightly coupled modules problem
Changes in one module affect others, defeats modularity
Testing approach for modules
Testing approach for modules
Validate each module independently before integration
