csci 387 quiz 3 Flashcards

(68 cards)

1
Q

software design and implementation is the stage in which

A

an executable software system is developed

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

you should identify software components and relationships based on

A

requirements

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

implementation is

A

realizing the design as a program

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

build vs buy: why is build problematic?

A

building to be used once

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

object-oriented design using UML: labels show

A

number of components (1..n means up to n)

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

how to identify objects

A

what shows behavior in different states?

scenario-based analysis

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

two kinds of design models

A

structural and dynamic

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

interface specification: want to be able to design objects and components

A

in parallel

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

objects may have ?

A

several interfaces

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

abstract class doesn’t have

A

objects

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

abstract classes are ?

A

extended; they implement the interface

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

interfaces define

A

how classes communicate

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

design pattern

A

a way of reusing abstract knowledge about a problem and its solution

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

pattern

A

description of the problem, essence of solution; should be sufficiently abstract to be reused

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

design patterns should make use of

A

object-oriented characteristics (i.e., inheritance, polymorphism)

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

can have multiple ? in one application

A

design patterns

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

observer pattern

A

separates display of object from state itself

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

when is the observer pattern used?

A

when multiple displays of state are needed

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

observer pattern: all displays must be update when?

A

the state is changed

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

observer pattern: object (does/does not) need to know about display formats

A

does not

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

enhancing display performance is (practical/impractical)

A

impractical

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

singleton falls under

A

creational

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

adapter falls under

A

structural

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

bridge falls under

A

structural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
observer falls under
behavioral
26
strategy falls under
behavioral
27
design challenge of observer
observers need to know more
28
solutions to observer design challenge (observers needing to know more)
add parameters to notify method (problem with this is extra parameters and unused data), callbacks, new Observer interface
29
strategy design pattern
vary the algorithm independently of the clients who use it
30
observer design pattern has a ? dependency between objects
one-to-many
31
the point in the strategy design pattern is to
decrease compile time (if statements or multiple methods compile even if not called in run time)
32
strategy problem solution
strategy interface with different operations having their own classes that implement Strategy
33
examples of when we need the strategy pattern
for the group project, we could use multiple classes for which form or role to bring up
34
singleton
ensure a class has only one instance, and provide a global point of access to it
35
how to make singleton work
make the constructor private; new private method to generate instance; public get method
36
advantages to singleton
convenience, controlled access, flexible
37
issues with singleton
initialization, makes testing harder, synchronization, may reduce parallelism, memory leaks
38
adapter (wrapper) design pattern
convert the interface of a class into another interface clients expect (like dvd player for computer with no dvd slot - plug in external one to usb port)
39
bridge design pattern
decouple an abstraction from its implementation so that the two can vary independently (new classes with same methods, don't change the interface b/c it would affect others that don't need to be affected)
40
why is it bad practice to have a mutable singleton class?
mutable means it can change its internal state, thus essentially creating a new instance or at least varying the original
41
switching between different layouts using a context makes use of what design pattern?
assuming adapter?
42
program testing
shows a program does what it is intended to do; discover program defects
43
goals of program testing
1. one test for every requirement in the requirements document 2. tests for all system features 3. defect testing is concerned with rooting out undesirable system behavior (crashes, interruptions, data corruption)
44
validation and defect testing
test for expected use then expose defects
45
verification asks
are we building this right
46
validation asks
are we building the right product
47
aim for verification and validation is to
establish confidence that the system is fit for its purpose
48
system purpose is composed of
software purpose, user expectations, and marketing environment
49
static verification
discover problems
50
dynamic verification
exercise/observe product behavior (more like unit testing)
51
stages of testing
development (unit testing), release (beta testing), user (test in own environment)
52
development testing is composed of
unit testing, component testing, and system testing
53
basic difference between unit and component testing
in unit testing, all the methods of other classes and modules are mocked; for component testing, all stubs and simulators are replaced with the real objects for all the classes (units) of that component, and mocking is used for classes of other components
54
system testing
a complete and integrated software is tested
55
cheaper and faster to (build/buy); only problem is
buy; how to modify the system to fit your requirements
56
object-oriented design involves developing a number of different software models, which is not cost-effective for ?
small systems
57
for large systems developed by different groups, ? are an important communication mechanism
design models
58
system context model
a structural model that demonstrates the other systems in the environment of the system being developed
59
interaction model
a dynamic model that shows how the system interacts with its environment as it is used
60
system context for the weather station
weather information system connected to control system, weather stations, satellite, etc.
61
interaction model for the weather station
use cases (e.g., weather information system can report weather or report status)
62
approaches to identification and differences
1. grammatical: natural language (noun = object, verb = method) 2. identify tangible things in the application domain 3. behavioral approach: identify objects based on what participates in what behavior 4. scenario-based analysis: objects, attributes, and methods in each scenario are identified
63
application domain objects
'hardware' objects related to the instruments in the system
64
examples of design models
subsystem (logical groupings), sequence (bars and arrows), state machine models, use-case, aggregation, generalization, etc.
65
consequences of the observer pattern
subject only knows the abstract observer and does not know details of the concrete class
66
software design and implementation are inter-leaved activities. the level of detail in the design depends on
the type of system and whether you are using a plan-driven or agile approach
67
process of object oriented design includes activities to
design the system architecture, identify objects in the system, describe the design using object models, and document the component interfaces
68
differences between adapter and bridge pattern
adapter allows the main class to function with other formats, while bridge creates different classes