chapter 1 Flashcards

1
Q

what is design?

A

is a set of activities that need to be performed by the designer in oder to specify a solution to a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are activities of a design process?

A

Activities I enjoy == Peanut Butter Every Evening

  • postulate a solution
  • build a model
  • evaluate the model
  • elaborate the model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the nature of a design process [ DP ]?

A

Process Is Basic
- DP doesn’t follow a precise sequence of events
- DP is iterative in nature
- DP has extensive backtracking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is the problem and solution in a design?

A

problem : req specification
solution : description on how to meet the reqs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what does software design describe?

A
  • the system : so that coders can build it with out problems
  • parts of the system and how they are assembled
  • detail of each part
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Software design [ SD ] documents contain?

A

text and diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is a design plan?

A
  • a blue print during dev’t
  • used to negotiate reqs and set expectations
  • used as a Guide for task implementation [ code, test, design, integration ]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a design concept?

A

a way to provide designers with basic ideas from which more sophisticated design models can be applied

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what questions does a design concept help a designer answer?

A
  • with what criteria they can partition the SW
  • how to separate function and representation of SW
  • how to define technical quality of a SW
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what are the fundamental concepts in software design?

A

ASMR IS fundamental
- Abstraction
- Software arch
- modularity
- refinement
- info hiding
- software procedure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is abstraction?

A

is the management of complexity by focusing on essential characteristics and hiding implementational details

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are abstraction method in OOP?

A
  • encapsulation
  • polymorphism
  • inheritance
  • info hiding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is modularity?

A

the degree of how well a SW can be understood by examining its components independently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is a module?

A

an independent unit used to construct a more complex structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

give examples of a module.

A
  • routines and subroutines [ methods and functions ]
  • files
  • library files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are quality attributes of a module?

A
  • clearly distinguishable
  • separation of concerns
  • loosely coupled
  • cohesive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is cohesion and coupling?

A

cohesion - measure of functional strength of a module

coupling - measure of degree of interdependence of a module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what are ranges of coupling?

A

highest to lowest [ —>]
high : content, common, control
medium : stamp, data
low : uncoupled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what is content coupling?

A

1 module can modify content [ internal data, code ] of another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is common coupling?

A

modules share common data [ global DS and common blocks ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what factors make common coupling a poor choice?

A

No 4 Red flags
- no clear data responsibility
- reduced readability
- reduced maintainability
- reduced usability
- reduced control over data access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

give an example of a content coupling and an improvement for it.

A

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()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

give an example of a common coupling and an improvement for it.

A

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();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what is control coupling?

A

modules communicate with each other by passing control information [ parameters ]. can be good or bad

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

what situation makes a control coupling good or bad?

A

good - if parameters allow refactoring and reuse
bad - if a module needs to be aware of internal logic of another module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Give example of a acceptable control coupling and describe in what scenario it would have been unacceptable?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

what is stamp coupling?

A

a module passes an entire data structure to another module that doesn’t have access to the entire structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

give an example for stamp coupling and an improvement for it.

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

what is data coupling?

A

communication b/n modules occurs by passing parameters as a simple list of arguments, and every item in the list is used.

30
Q

what are the strength and weaknesses of data coupling?

A

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

31
Q

a good software design will have _________ coupling and ________ cohesion?

A

loose coupling and high cohesion

32
Q

define cohesion

A

measure the degree to w/c components of a module are functionally related towards performing a single task

33
Q

___________ is the internal glue with which components are constructed?

A

cohesion

34
Q

what is the range of cohesion from best to worst?

A

fiona still communicated puss till leslie came
- functional info
- sequential
- communication
- procedural
- temporal
- logical
- coincidental

35
Q

what is coincidental cohesion?

A

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.

36
Q

which cohesion has strong possibilities of causing ‘side effects’ every time the module is modified?

A

coincidental

37
Q

give an example of a coincidental cohesion?

A

print next line
add 4 to 5th arg
convert 8th arg to float
reverse 2nd string arg

38
Q

what is logical cohesion?

A

components of a module are logically categorized to do the same thing, but are not functionally related

39
Q

give an example of logical cohesion and an improvement for it.

A
  • 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 …
40
Q

what is temporal cohesion?

A

components of a module are grouped based on timing.

41
Q

what cohesion enforces execution of tasks in a similar time span?

A

temporal cohesion

42
Q

what is the downside of temporal cohesion?

A
  • difficult to change
  • low component reusability
  • regression fault
43
Q

give an example of temporal cohesion and an improvement for it.

A
  • A system initialization routine that initializes various components
  • Improvement
  • system initialization routine sends messages to components and then components will instantiate them selves
44
Q

what is procedural cohesion?

A

components of a module are grouped together to ensure a particular sequence of execution

45
Q

what is the downside of procedural cohesion?

A

components are still weakly cohesive and unlikely to be reusable

46
Q

give an example of procedural cohesion.

A
  • calculate student GPA
  • print student record
  • calculate student CGPA
  • print student CGPA
47
Q

what is communication cohesion?

A

components of a module are grouped together because they read or update the same data structure

48
Q

give an example of communication cohesion?

A
  • component writes records to database
  • component sends data from from db to printer
49
Q

what is sequential cohesion?

A

one component of a module uses the output from another component as an input

50
Q

___________ cohesion occurs naturally in functional programing languages?

A

sequential cohesion

51
Q

what is functional cohesion?

A

all components of the module contribute to a single well defined task

52
Q

what are advantages of modularity?

A
  • increase comprehension and understandability
  • allows parallel module dev’t
  • increases quality since [ testing, maintaining, verifying and measuring ] modules is easier
53
Q

what is refinement?

A

a process by which a designer successively adds details to design components

54
Q

where does refinement begin?

A
  • with a statement of function at the highest level of abstraction
55
Q

refinement and ____________ are complimentary functions?

A

absraction

56
Q

what is Software procedure?

A

is a precise specification of processing:
SDDR
- seq of events
- Data structures
- decision points
- repetitive operations

57
Q

what is software architecture?

A

describes structure of computer components and how these structures provide conceptual integrity to the system

58
Q

what are design principles?

A

principles that help software designers manage the design process

59
Q

what are internal and external quality factors and give examples?

A

EQF - properties that an be observed by the user
[ speed, usability, reliability ]

IQF - properties observed from a technical perspective
[ testability, portability, maintainability ]

60
Q

give examples of common design principles.

A
  • 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
61
Q

what are the goals of a software design [ SD ]?

A

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

62
Q

______________ is an abstraction of a system?

A

software architecture

63
Q

how is software arch an abstraction?

A
  • it defines elements and how they interact [ relate ] but suppresses private details
64
Q

what are externally-visible properties?

A

are assumptions 1 element makes about another.

  • req services
  • provided services
  • performance
  • fault handling
  • resource usage
65
Q

what is the arch of the simplest system?

A

system has 1 element related only to itself

66
Q

every system has an architecture?

A

True

67
Q

what happens If you don’t explicitly develop an architecture?

A

you will get one anyway

68
Q

what was Berry Boehm’s take on system arch?

A

“If a project has not achieved a system arch, the project should not proceed to a full scale dev’t.”

69
Q

summarize the importance of system arch.

A
  • 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 ]
70
Q

compare and contrast b/n Arc and Design?

A

DA’s office
- all arch is design
- not all design is arch
- arch draws boundary b/n architectural and non-architectural design

71
Q

how is software arch represented?

A

using certain views

72
Q

what are system arch views?

A

views are representations of overall system arch that is considered important to 1 or more stakeholders.