- (3 points) Verification is (choose one)
- all activities that are undertaken to ascertain that
the software meets its objectives.
(see p. 256)
- only performed after all coding is complete.
- guaranteed to find all defects in a software system.
- another term for white-box testing.
- used to investigate the validity of the software.
- (3 points) Which of the following is not an approach
to black-box testing (choose one)?
- Structural testing.
- Decision table-based testing.
- The cause-effect graphs technique.
- Syntax driven testing.
- Decomposing specifications.
- (3 points) In Object Oriented design, there is a single
type of module, which is (choose one)
- the ADT module. (p. 117)
- the module that hides a secret.
- the sub-type module.
- the extends module.
- the USES module.
- (3 points) The characteristic that most sets software apart
from other engineering products is that software is (choose one)
- malleable. (p. 117)
- sold directly to consumers.
- created with a process model.
- invisible to the naked eye.
- reusable.
- (3 points) Suppose an ellipse is defined as ``the path of
the point that moves so that the sum of its distances from
two fixed points (x1, y1) and (x2, y2) is constant.''
This definition is (choose one)
- an operational definition. (p. 157)
- a formal definition.
- a descriptive definition.
- a declarative definition.
- a top-down definition.
- (3 points)
Dijkstra has written ``Program testing can be used to show the
presence of bugs, but never to show their absence.''
The primary reason for this is (choose one)
- software lacks the continuity property. (p. 261)
- most programs have many bugs.
- bugs are hard to find.
- not all failures are caused by errors.
- black-box testing is inherently inaccurate.
- (3 points)
Subdomains used in black-box testing should (choose one)
- include both valid and invalid inputs.
- not overlap.
- include boundary conditions. This answer is also OK
- satisfy the complete coverage principle.
- form a partition of the domain.
- (3 points)
In the requirements definition we focus on ``what'' not
``how.'' This is an illustration of which Software
Engineering principle?
- Separation of concerns.
- Modularity.
- Design for change.
- User-friendliness.
- Principle of Generality.
- (3 points)
Which one of the following is not on Boehm's list of Top 10
software risk items?
- Overemphasis on the design phase.
- Continuing stream of requirements changes.
- Unrealistic schedules and budgets.
- Gold-plating.
- Developing the wrong user interface.
- (6 points each, 36 points total)
Define each of the following terms, as used in software
engineering. Your answer should be a crisp and precise
definition, using 20 words or less.
- Software design
A system decomposition into modules.
A description of what each module is intended to
do and of the relationship among modules.
- Testing Oracle
A mechanism for determining whether the outcome
of a test is correct.
- Ideal test set
A test set that reveals every error in the system.
A test set that always shows the existence of an error
in a program, if an error exists.
- Program family
The set of versions of one software product.
- Structural testing
White-box testing. Analyzing the product and
related documents. Test cases based on structure of
source code.
- The clients of a module
Other modules that uses the module's services.
-
Recall that a prime number is an integer greater than 1 that has
no factors other than 1 and itself. Twin primes are two primes
that are two apart. For instance, 17 and 19 are twin primes.
Also recall that in Java (as in C and C++) % is the modulus
operator, and returns the remainder when the first operand is divided
by the second.
Consider the following Java method, which is supposed to return true if
its arguments are twin primes, and false otherwise.
boolean areTwinPrimes(int n1, int n2)
{
// make sure that the inputs are two apart
if (n1 + 4 != n2) // an error; should be 2 not 4
return false;
// We now know the arguments are ``twins'' (2 apart); now
// test if they are both prime (have no factors).
for (int i=3; i<n1; i++)
{
if (n1 % i == 0)
return false;
if (n2 % i == 0)
return false;
}
return true;
}
- (5 points) There are at least two errors in areTwinPrimes.
One is indicated by a comment. What is another?
- (5 points) The method could generate a fault that does not lead to
a failure. Explain how, specifying the input parameters, the
fault, and why no failure occurs.
Input (10, 14) leads to a fault: the for loop is executed.
The function correctly returns false, so there is no error.
- (5 points)
Give an example of input parameters that cause a failure, and
say what the failure is.
Input (17,19) returns false, should return true. Any input
of twin primes will cause a failure.
- (4 points) Describe in a few words each the four quadrants
of the spiral model.
- Upper left (northwest).
Determine objectives, alternatives constraints
- Upper right (northeast).
Evaluate alternatives, identify and resolve risks
- Lower right (southeast).
Develop, verify next level product
- Lower left (southwest).
Plan next phase
-
(8 points)
Below are several activities that occured in one software project.
Write the letter before each activity in the corresponding quadrant
of the spiral model below.
A. A senior programmer whips up a prototype in Java which wows the
Executive Vice President. [NE]
B. Competitor has released upgrade to excellent reviews. Senior
management meets to determine response. [NE]
C. The chief QA engineer develops an integration test plan. [SW]
D. The programming team, aided by two contract programmers, implements
the design in a combination of Java and Visual Basic. [SE]
E. Senior analyst writes memo comparing risks of rushing product
to market vs. not responding quickly to competitor's upgrade.
[NW] ([NE] OK too)
F. An outside consultant reports on networking options that will
exist in the near future. [NW]
G. A team consisting of a software project leader, two users,
a senior programmer, and a technical writer meet to go
over the requirements specification. [SE]
H. Six current users from locations around the country are flown
to the company for a week to test the overall workings and
user-friendliness of the new product. [SE]
- (10 points)
Give two reasons for developing a USES diagram as part of the software design process.
1. Determine whether a hierarchy exists. (Not, to see the hierarchy.)
2. To aid in asigning modules to programmers.
3. To aid in developing integration test plans, by determining module relationships and dependencies.
4. To minimize coupling and maximize cohesion.
5. To help determine the order of implementing modules.
6. To avoid (or identify) cycles.
7. Developing module interfaces.
8. Identify common functions that should go in one module.