Assign-41 x
CSCE 5430, FALL 2021
CSCE 5430, Fall 2021
Individual Assignment 4
Due Date: Friday, 11/5, 11:59pm
Submission: Canvas
Weight: 6% of the total grade
Assignment Description:
1. (12 points; 3 points for each style) For each of the architectural styles described in the lecture (4 architecture styles), give an example of a real-world application whose software design might incorporate that style. Don’t describe each architectural style. Just simply provide an example for each.
2. (12 points) What are the advantages and disadvantages of using the same standardized language or tools across applications in your organization?
3. (20 points) Explain the concept of an equivalence partition, provide an example, and discuss how this concept can be used in testing.
4. (12 points) How are faults and failures related to testing and debugging?
5. (12 points) What are three conditions to observe software failures?
6. (32 points; 8 points for each sub-question) Consider the following program
findLast
, which contains a fault.
public int findLast (int[] x, int y)
{
//effects: If x == null throw NullPointerException
// else return the index of the last element
// in x that equals y.
// If no such element exists, return -1
for (int i = x.length-1; i > 0; i–)
{
if (x[i] == y)
{
return i;
}
}
return -1;
}
// test: x=[2, 3, 5]; y=2
// expected = 0
(a) Identify the fault
(b) Identify a test case that does not execute the fault. Also provide expected and actual outputs for the identified test case.
(c) Identify a test case that executes the fault, but does not result in an error state. Also provide expected and actual outputs for the identified test case.
(d) Identify a test case that satisfies all conditions that are required to observe software failure. Also provide expected and actual outputs for the identified test case.
Document formats: Your documents may be in any of the following formats (1) MS Word (2) Adobe Acrobat (pdf). Hand-written document is not accepted and won’t be graded.