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
what is data coupling?
communication b/n modules occurs by passing parameters as a simple list of arguments, and every item in the list is used.
what are the strength and weaknesses of data coupling?
strength:
- a module only sees data elements it requires
weakness
- if a module is poorly partitioned, it may require too many data arguments to be passed
- as a rule of thumb do not exceed 3 parameters
a good software design will have _________ coupling and ________ cohesion?
loose coupling and high cohesion
define cohesion
measure the degree to w/c components of a module are functionally related towards performing a single task
___________ is the internal glue with which components are constructed?
cohesion
what is the range of cohesion from best to worst?
fiona still communicated puss till leslie came
- functional info
- sequential
- communication
- procedural
- temporal
- logical
- coincidental
what is coincidental cohesion?
parts of a module are grouped arbitrarily and the only relationship b/n the parts is that they have been grouped together and their location in the code.
which cohesion has strong possibilities of causing ‘side effects’ every time the module is modified?
coincidental
give an example of a coincidental cohesion?
print next line
add 4 to 5th arg
convert 8th arg to float
reverse 2nd string arg
what is logical cohesion?
components of a module are logically categorized to do the same thing, but are not functionally related
give an example of logical cohesion and an improvement for it.
- A component reads and groups all incoming inputs together:
- from [ disk, tape, and network ]
- Improvement
- have subclasses for devices and then the read operation is only performed by the subclass
- tape subclass reads from tape …
what is temporal cohesion?
components of a module are grouped based on timing.
what cohesion enforces execution of tasks in a similar time span?
temporal cohesion
what is the downside of temporal cohesion?
- difficult to change
- low component reusability
- regression fault
give an example of temporal cohesion and an improvement for it.
- A system initialization routine that initializes various components
- Improvement
- system initialization routine sends messages to components and then components will instantiate them selves
what is procedural cohesion?
components of a module are grouped together to ensure a particular sequence of execution
what is the downside of procedural cohesion?
components are still weakly cohesive and unlikely to be reusable
give an example of procedural cohesion.
- calculate student GPA
- print student record
- calculate student CGPA
- print student CGPA
what is communication cohesion?
components of a module are grouped together because they read or update the same data structure
give an example of communication cohesion?
- component writes records to database
- component sends data from from db to printer
what is sequential cohesion?
one component of a module uses the output from another component as an input
___________ cohesion occurs naturally in functional programing languages?
sequential cohesion
what is functional cohesion?
all components of the module contribute to a single well defined task
what are advantages of modularity?
- increase comprehension and understandability
- allows parallel module dev’t
- increases quality since [ testing, maintaining, verifying and measuring ] modules is easier
what is refinement?
a process by which a designer successively adds details to design components
where does refinement begin?
- with a statement of function at the highest level of abstraction
refinement and ____________ are complimentary functions?
absraction
what is Software procedure?
is a precise specification of processing:
SDDR
- seq of events
- Data structures
- decision points
- repetitive operations
what is software architecture?
describes structure of computer components and how these structures provide conceptual integrity to the system
what are design principles?
principles that help software designers manage the design process
what are internal and external quality factors and give examples?
EQF - properties that an be observed by the user
[ speed, usability, reliability ]
IQF - properties observed from a technical perspective
[ testability, portability, maintainability ]
give examples of common design principles.
- design is not coding, coding is not design
- design should accommodate change
- design should be traceable to analysis model
- design should consider alternative approaches
- design should be exhibit uniformity and integration
what are the goals of a software design [ SD ]?
Goal after RRR CEFU
- reusable
- reliable : application is relatively defect free
- robust : SD must handle unusual conditions
- correct : SD must satisfy reqs
- efficient : SD should efficiently use memory and machine cycles
- flexible : SD should accommodate changing reqs
- usable : application should be
______________ is an abstraction of a system?
software architecture
how is software arch an abstraction?
- it defines elements and how they interact [ relate ] but suppresses private details
what are externally-visible properties?
are assumptions 1 element makes about another.
- req services
- provided services
- performance
- fault handling
- resource usage
what is the arch of the simplest system?
system has 1 element related only to itself
every system has an architecture?
True
what happens If you don’t explicitly develop an architecture?
you will get one anyway
what was Berry Boehm’s take on system arch?
“If a project has not achieved a system arch, the project should not proceed to a full scale dev’t.”
summarize the importance of system arch.
- provides communication among stakeholders
- captures early design decisions
- defines constraints on implementation details
- enables or inhibits a system to achieve quality attributes
- makes change management easier
- is a reusable model
- basis for an incremental dev’t [ prototyping ]
compare and contrast b/n Arc and Design?
DA’s office
- all arch is design
- not all design is arch
- arch draws boundary b/n architectural and non-architectural design
how is software arch represented?
using certain views
what are system arch views?
views are representations of overall system arch that is considered important to 1 or more stakeholders.