Want to make creations as awesome as this one?

309 Week 9, Monday work page

Transcript

Q1: Define Modular Design

Modular design organizes code into modules such that each module has high cohesion...

It is a softwware design apporach where a system is divided into a set of smaller, independent..

Means organizing code into modules so that:Each module has high cohesion and that modules have low coupling between them

Q2: What is Cohesion

a measure of how focused or strongly-related the responsibilities of a single module are. An element with low cohesion does many unrelated things

Why low cohesion is bad!: Increased difficulty in understanding modules. Increased difficulty in maintaining a system, because logical changes in the domain affect multiple modules, and because changes in one module require changes in related modules.Increased difficulty in reusing a module because most applications won’t need the random set of operations provided by a module.

Q3. What does it mean for a module to have low coupling

Low coupling means not many interconnections. Coupling is a measure of how modules are interconnected, so low coupling means not many of those interconnections.

Q4. What are the three main reasons that modular design is important

  • Budget management
  • Maintainability
  • Reliabilty

Q5. How will you know if your design is modular?

If you can identify modules and test each module independently of the rest of the code.

Q6. What do you understand by layered design?

Layered design is a special case of modular design where modules are organized in to layer.Modules in an upper layer are allowed to use the modules in the lower layer below it.

Q7. Give two examples of layered design in real-life complex software.

Operating system, networking

Q8. What are a few outstanding benefits of using layered design.

- It's an important tool for managing complexity. You can go about understanding a functionality one layer at a time.- Portability, maintainability, reusability- change in a layer can be hidden behind its interface- a layer can be substituted by another implementation of the layer- a layer can be reused in some other system- serves a s a blueprint for constructing systems- layering helps focus on one specific part of a system- development can proceed a layer at a time- specialized teams can be assigned to layers (GUI developers to the GUI layer)