Modular design involves breaking a big problems into sub problems. Group repeated instructions into modules Group related actions into modules aids readability as allows abstraction allows individual testing
Also known as top down design
Can be applied to form
- data classes
- helper functions
Modular design can be done in multiple forms
Top down design
Breaking down a system to smaller components, subsystems are futher broken down in layers to get base elements, which are then build as modules.
Object oriented design
Model ADTs to represent objects relevant to the problem. Modules then facilitate interactions between these objects
Differences
top down focused on breaking down the process
object oriented focuses on breaking down the objects
Eg, designing a building top down: what should be designed, what processes need to be done object oriented: what is the components of a building, how do they interact, what are the properties of these components, how are they formed