1
------CEN 5035 - Software Engineering ------
Quiz 2 -- Spring 2007 –- Solution Notes
- a. Potentially changeable design decisions are isolated (i.e.,
“hidden”)to minimize the impact of change.
b. An aspect is an abstraction which encapsulates the code associated
with a cross-cutting (i.e., distributed across a number of program
components) concern or requirements.Thus, aspects can be used to
isolate potentially changeable “cross-cutting concerns” (design
decisions that cut across program components) in order to minimize
the impact of change.
2. He agrees that “heavyweight” design is unnecessary for small and
medium-sized business systems, but that for large, especially critical
systems, design activity is useful in ensuring that teams working on
different parts of a system are properly coordinated.
3. Legacy systems may be “wrapped” by defining a set of interfaces and
providing access to the systems through these interfaces.
4. The results and trade-offs (i.e., pros and cons) of applying the
pattern.
- a. It models the sequence interactions when the external mapping
system requests data fromaweather station.
b. Vertically; time progresses down the dashed vertical lines.
c. Interactions between objects. (They are messages or events – not
dataflows.)
- The time when the corresponding object is the controlling object in the system.
6. For long-lifetime systems, the focus should be on maintainability. You
will have to adapt the system to new requirements, which will probably
mean making changes to components and how they are used. Thus, it is
probably wise to avoid using components and systems from external
suppliers if you do not have access to the source code.
7. Verification concerns whether or not a system conforms to its
specification (“Are we building the product right?”). Validation
concerns whether or not the system does what the user really
needs/wants (“Are we building the right product?”).
8. a. all
b. prototype, program
c. Static V&V techniques (e.g., inspections) are applicable to ALL
software entities, including non-executable (i.e., program)
entities. Dynamic V&V techniques (testing) only apply to
executable software entities.
9. During machine-based testing, errors can mask (hide) other errors. In
inspections, however, such interactions are not normally an issue.
Thus, a single inspection session can discover many errors in a
system.
10. Management must not use inspections results for (owner) staff
appraisals (since this would probably result in an unwillingness to
report defects during inspections due to the negative impact this
could have on the owner).
11. People naturally tend to avoid exposing work they are not confident
about to others for close scrutiny. Thus, a reader may be inclined to
gloss over parts of his/her work that are more likely to contain
errors.
12. The specification may not reflect the real requirements;The proof may
contain errors; andAn incorrect usage pattern may be assumed.
13. Defects are avoided through the use of formal specification and
(function theoretic) verification. Only statistical testing is
employed to measure reliability. (There is no defect testing.)
14. If the input (initial state) satisfies pre-condition P and (if)
program S executes and terminates, then the output (final state) will
satisfy post-condition Q.
15. a. false
b. true (vacuously)
c. true
d. false
e. true
f. false
g. false
16. Using the if-then Rule of Inference:
{P b } S {Q}, (P b) Q
------
{P} if b then S {Q}
(1) {P & b} S {Q}:
{Z=B A>B} Z := A {Z=A A>B} Z=Max(A,B)
(2) (P b) Q:
(Z=B AB) Z=Max(A,B)
17. a. P=>I, {I&b}S{I}, (I&~b)=>Q
b. initialization: (P=>I)
Does (n>=0 & p=1 & k=0) => p = 2k?
1 = 1
preservation: ({I&b} s {I})
{p = 2k & k>n }
p := 2*p
{p = 2k+1 & k>n}
k := k+1
{p = 2k & k-1>n} => I
finalization: ((I&~b)=>Q)
Does (p = 2k & k=n) => p = 2n ? Clearly
18. Re-running test cases that previously ran without revealing errors.
The purpose is to ensure that program changes have not introduced
errors in code that ran correctly beforehand.
19. When each element of every equivalence class is handled by the program
in the same manner (i.e., either correctly or incorrectly).
20. Consider the program “if A and B then S” and two test cases that
result in (1) T F and (2) F T being the values of A and B,
respectively. This gives condition coverage (since each condition has
been true at least once and false at least once) but not statement
coverage since S, which lies along the true branch, is never executed.
This proves that condition coverage does not imply (subsume) statement
coverage.
21. a. X>Y & Y<0 & X-1≤Y+1 & Y+1≥0
b. X=0, Y=-1
22. An incremental integration strategy can significantly reduce error
localization and correction time since problems encountered are
usually associated with the interface between the most recently added
element(s) and the remainder of the system.
23.An indication of how a system is expected to be used in some
environment.
24. As an evolving program changes, its structure tends to become more
complex. Extra resources must be devoted to preserving and
simplifying the structure.
25. Maintenance to repair software faults; Maintenance to adapt software
to a different operating environment; Maintenance to add to or modify
the system’s functionality.The most common is functionality addition
or modification.
26. Measurement: attributes of the current process are measured. (Provides
a baseline for assessing improvements.)
Analysis: bottlenecks and weaknesses are identified;changes aimed at
improving measures are identified.
Change: changes are introduced.
27. a. The Software Engineering Institute (SEI) is a DoD-funded organ-
ization (established in 1984 at CMU) to assess and improve the
capabilities of the US software industry.
b. A Capability Maturity Model” (CMM) is a reference model used to
assess the extent to which an organization’s processes follow best
(i.e., “mature”) practice in a specified discipline.
c. The Capability Maturity Model Integrated (CMMI) framework is
comprised of an integrated set of CMMs currently spanning the
disciplines (“bodies of knowledge”) of Systems Engineering (SE),
Software Engineering (SW), Integrated Product and Process
Development (IPPD), and Supplier Sourcing (SS). Each model has
both a continuous and a staged representation (instantiation).
d. The continuous representation enables comparisons across and among
organizations ona process-area-by-process-area basis; the staged
representation provides a single maturity rating that summarizes
appraisalresults over all process areas.