chapter 1 Flashcards
what is design?
is a set of activities that need to be performed by the designer in oder to specify a solution to a problem
what are activities of a design process?
Activities I enjoy == Peanut Butter Every Evening
- postulate a solution
- build a model
- evaluate the model
- elaborate the model
what is the nature of a design process [ DP ]?
Process Is Basic
- DP doesn’t follow a precise sequence of events
- DP is iterative in nature
- DP has extensive backtracking
what is the problem and solution in a design?
problem : req specification
solution : description on how to meet the reqs
what does software design describe?
- the system : so that coders can build it with out problems
- parts of the system and how they are assembled
- detail of each part
Software design [ SD ] documents contain?
text and diagram
what is a design plan?
- a blue print during dev’t
- used to negotiate reqs and set expectations
- used as a Guide for task implementation [ code, test, design, integration ]
what is a design concept?
a way to provide designers with basic ideas from which more sophisticated design models can be applied
what questions does a design concept help a designer answer?
- with what criteria they can partition the SW
- how to separate function and representation of SW
- how to define technical quality of a SW
what are the fundamental concepts in software design?
ASMR IS fundamental
- Abstraction
- Software arch
- modularity
- refinement
- info hiding
- software procedure
what is abstraction?
is the management of complexity by focusing on essential characteristics and hiding implementational details
what are abstraction method in OOP?
- encapsulation
- polymorphism
- inheritance
- info hiding
what is modularity?
the degree of how well a SW can be understood by examining its components independently
what is a module?
an independent unit used to construct a more complex structure
give examples of a module.
- routines and subroutines [ methods and functions ]
- files
- library files
what are quality attributes of a module?
- clearly distinguishable
- separation of concerns
- loosely coupled
- cohesive
what is cohesion and coupling?
cohesion - measure of functional strength of a module
coupling - measure of degree of interdependence of a module
what are ranges of coupling?
highest to lowest [ —>]
high : content, common, control
medium : stamp, data
low : uncoupled
what is content coupling?
1 module can modify content [ internal data, code ] of another.
what is common coupling?
modules share common data [ global DS and common blocks ]
what factors make common coupling a poor choice?
No 4 Red flags
- no clear data responsibility
- reduced readability
- reduced maintainability
- reduced usability
- reduced control over data access
give an example of a content coupling and an improvement for it.
let’s say we have:
1. func lookUp()
2. List<Customer> customers = [];
- look up handles searching for customers.
- if it doesn't find the customer it will directly modify contents of customers to add the new customer;</Customer>
improvement:
lookUp() calls addCutomer()
give an example of a common coupling and an improvement for it.
we have:
1. globalDataStore() - maintains data of various modules
- modules can directly read and write to it.
improvement:
2. dataStoreManager();
- will be in charge of data in the gDS();
- modules will request read and write form the dSM();
what is control coupling?
modules communicate with each other by passing control information [ parameters ]. can be good or bad
what situation makes a control coupling good or bad?
good - if parameters allow refactoring and reuse
bad - if a module needs to be aware of internal logic of another module
Give example of a acceptable control coupling and describe in what scenario it would have been unacceptable?
def displayGender( gender):
if gender == “male”:
print(“is male”)
else:
print(“is female”)
def main():
_gender = “female”
displayGender(_gender)
This would have been bad if:
- main() called dG(), and dG() passed back a flag that said something, and as a result performs some other action
what is stamp coupling?
a module passes an entire data structure to another module that doesn’t have access to the entire structure.
give an example for stamp coupling and an improvement for it.
def printCustomerInfo (Customer customer):
print("${customer.name}, ${customer.address}, ${customer.billingInformation}")
improvemnt:
- printCustomerInfo() : accepts a name, address and billingInfo instead of the entire Customer data structure
- better b/ce Customer may have other fields that are not used by the pCI() function