0% found this document useful (0 votes)
33 views2 pages

HW 1

The document discusses software engineering homework assignment 1 for a course. It covers several topics: 1) It is acceptable for software to have defects upon delivery due to the high costs of testing, user expectations of failures, and marketing pressures to be first to market. 2) Program inspections are an effective and cheaper technique than testing for finding defects as multiple defects can be found in one inspection and incomplete programs can be inspected. Inspections also consider broader quality attributes. 3) Certain types of errors in C++ like data faults, control faults, input/output faults, interface faults, and storage management faults cannot be detected by compilers. Examples of each type are provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

HW 1

The document discusses software engineering homework assignment 1 for a course. It covers several topics: 1) It is acceptable for software to have defects upon delivery due to the high costs of testing, user expectations of failures, and marketing pressures to be first to market. 2) Program inspections are an effective and cheaper technique than testing for finding defects as multiple defects can be found in one inspection and incomplete programs can be inspected. Inspections also consider broader quality attributes. 3) Certain types of errors in C++ like data faults, control faults, input/output faults, interface faults, and storage management faults cannot be detected by compilers. Examples of each type are provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

CpE 408 2006 – 2007 2st semester

Software Engineering 2
HW 1
Due Date: 10/3/2007

22.2) It is not necessary for a program to be completely free of defects when it is


delivered, for the following reasons:

 Testing is a costly process. It takes about 40% of the total project cost.

 User expectations: Many users have low expectations of their s/w and they
are not surprised when it fails. The users are willing to accept system
failures when the benefits outweigh the disadvantages.

 Marketing environment: When a company has few competitors, it may


decide to release a program before it has been fully tested and debugged
because they want to be the first into the market. Where costumers are not
willing to pay high prices for s/w, they are willing to tolerate more s/w
faults.

22.4) Program inspection is an effective technique for the following reasons,

 Many different defects can be detected in a single inspection process.


However, in testing only one error can be detected per test.

 Incomplete versions of a system can be inspected without additional costs.


Therefore inspection is less expensive than testing.

 Inspection can consider broader quality attributes of a program such as


compliance with standards, portability and maintainability.

Things that are unlikely to be discovered through inspection are emergent


properties of a program like performance, reliability, usability. Besides, run-time
errors, and specification errors.

22.6) In C++ the following errors cannot be detected by a compiler,

 Data faults: Should the upper bound of the arrays be equal to size of array
minus one?
Is there any possibility of buffer overflow?

E.g.,
int i, A[10];
For (i=0 ; i<15; i++) A[i]= i;
 Control faults: For each conditional statement is the condition correct?
Is each loop certain to terminate?
In case statement, are all possible cases accounted for?
If a break is required after each case, has it been included?

E.g.,
int i;
while (i<10) {
Dosomething();
i--;
}

 Input/Output faults: Are all output variables assigned a value before they are
output?
Can unexpected inputs cause corruption?

E.g.,
Float y, x= 10;
Cout<< " x = " << x << "y = " << y << endl;

 Interface faults: Are the parameters in the right order?


If components access shared memory, do they have model of shared
memory structure?

E.g.,
Void search (int key, int A[], int n) {….}
Main(){
Int B[100], key;

Search (100, B, key);
…}
 Storage management faults: If a linked list is modified, have all links been correctly
reassigned?
If a dynamic structure is used, has space been allocated correctly?
Is space explicitly deallocated after it is no longer required?

E.g.,
Node x;
x= new node(10);
x->link= new node(20);
x= x->link ; // the pointer to the head node is LOST

You might also like