Back to the full dot-point answer
SingaporeComputer ScienceQuick questions
Programming and Software Development
Quick questions on Modularity and abstraction explained: H2 Computing
7short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.
What is decomposition?Show answer
Decomposition breaks a problem into smaller sub-problems, each simpler to solve. A program to "run a library" decomposes into manageable tasks - register members, search the catalogue, issue loans, calculate fines - which can be tackled one at a time. This is the first step in managing complexity.
What is modules that do too much?Show answer
A module should have high cohesion (one clear job); a "do-everything" module is as hard to maintain as no modules at all.
What are leaky interfaces?Show answer
If callers depend on a module's internals, you cannot change those internals freely - keep the interface the only point of contact.
What is tight coupling?Show answer
Modules that depend heavily on each other's internals must change together, defeating the point; aim for low coupling.
What is q1?Show answer
Define abstraction in the context of software. [1 mark]
What is q2?Show answer
Give two benefits of structuring a program into modules. [2 marks]
What is q3?Show answer
What is the interface of a module? [2 marks]
Have a question we have not covered?
This dot-point answer is short enough that we have not extracted many short questions yet. Read the full dot-point answer or ask Mo, our study assistant, in the chat for follow ups.