csci 387 quiz 3 Flashcards

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
Q

observer falls under

A

behavioral

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

strategy falls under

A

behavioral

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

design challenge of observer

A

observers need to know more

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

solutions to observer design challenge (observers needing to know more)

A

add parameters to notify method (problem with this is extra parameters and unused data), callbacks, new Observer interface

29
Q

strategy design pattern

A

vary the algorithm independently of the clients who use it

30
Q

observer design pattern has a ? dependency between objects

A

one-to-many

31
Q

the point in the strategy design pattern is to

A

decrease compile time (if statements or multiple methods compile even if not called in run time)

32
Q

strategy problem solution

A

strategy interface with different operations having their own classes that implement Strategy

33
Q

examples of when we need the strategy pattern

A

for the group project, we could use multiple classes for which form or role to bring up

34
Q

singleton

A

ensure a class has only one instance, and provide a global point of access to it

35
Q

how to make singleton work

A

make the constructor private; new private method to generate instance; public get method

36
Q

advantages to singleton

A

convenience, controlled access, flexible

37
Q

issues with singleton

A

initialization, makes testing harder, synchronization, may reduce parallelism, memory leaks

38
Q

adapter (wrapper) design pattern

A

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
Q

bridge design pattern

A

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
Q

why is it bad practice to have a mutable singleton class?

A

mutable means it can change its internal state, thus essentially creating a new instance or at least varying the original

41
Q

switching between different layouts using a context makes use of what design pattern?

A

assuming adapter?

42
Q

program testing

A

shows a program does what it is intended to do; discover program defects

43
Q

goals of program testing

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

validation and defect testing

A

test for expected use then expose defects

45
Q

verification asks

A

are we building this right

46
Q

validation asks

A

are we building the right product

47
Q

aim for verification and validation is to

A

establish confidence that the system is fit for its purpose

48
Q

system purpose is composed of

A

software purpose, user expectations, and marketing environment

49
Q

static verification

A

discover problems

50
Q

dynamic verification

A

exercise/observe product behavior (more like unit testing)

51
Q

stages of testing

A

development (unit testing), release (beta testing), user (test in own environment)

52
Q

development testing is composed of

A

unit testing, component testing, and system testing

53
Q

basic difference between unit and component testing

A

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
Q

system testing

A

a complete and integrated software is tested

55
Q

cheaper and faster to (build/buy); only problem is

A

buy; how to modify the system to fit your requirements

56
Q

object-oriented design involves developing a number of different software models, which is not cost-effective for ?

A

small systems

57
Q

for large systems developed by different groups, ? are an important communication mechanism

A

design models

58
Q

system context model

A

a structural model that demonstrates the other systems in the environment of the system being developed

59
Q

interaction model

A

a dynamic model that shows how the system interacts with its environment as it is used

60
Q

system context for the weather station

A

weather information system connected to control system, weather stations, satellite, etc.

61
Q

interaction model for the weather station

A

use cases (e.g., weather information system can report weather or report status)

62
Q

approaches to identification and differences

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

application domain objects

A

‘hardware’ objects related to the instruments in the system

64
Q

examples of design models

A

subsystem (logical groupings), sequence (bars and arrows), state machine models, use-case, aggregation, generalization, etc.

65
Q

consequences of the observer pattern

A

subject only knows the abstract observer and does not know details of the concrete class

66
Q

software design and implementation are inter-leaved activities. the level of detail in the design depends on

A

the type of system and whether you are using a plan-driven or agile approach

67
Q

process of object oriented design includes activities to

A

design the system architecture, identify objects in the system, describe the design using object models, and document the component interfaces

68
Q

differences between adapter and bridge pattern

A

adapter allows the main class to function with other formats, while bridge creates different classes