You are on page 1of 14

Questions

1. In the Software Design stage the following notions are


important. Abstraction, Modularity, Information Hiding,
Cohesion and Coupling. Define each of these and state why,
collectively, they are important in respect to design quality.
Abstraction The psychological notion of abstraction permits
one to concentrate on a problem at some level of generalisation
without regard to irrelevant low level details.
Modularity The division of software into separately named,
addressable components.
I nformation Hiding Modules are characterised by design
decisions such that other modules cannot access/modify their
data or procedures directly.
Cohesion - The nature of interaction within a module
Coupling - The nature of interaction between modules
Important in respect to design quality because programs with
positive characteristics in these areas should be
1) easier to understand and therefore better
2) should be easier to maintain and
3) More likely to be reusable
2. The following data relates to the first phase of a software project.
Use the data to create an activity network. Identify the critical
path.
Task
Duration
(days)
Depends on
A. Establish functional Requirements 7 -
B. Establish non-functional requirements 5 -
C. Implement prototype 14 -
D. Implement core program 14 A,B
E. Implement network components 4 B,C
F. Implement non-core components
9 D
G. Implement interfaces 6 E,F
H. Unit Test 14 G
A
B
C
D
E
F
H
G
3. Draw control graphs for the following program segments
(i) ..
If a or b Then
Procedure x
else Procedure y
End if
a
b
x
x
y
(ii) ..
If a and b Then
Procedure x
Else
Procedure y
Endif
a
x
y
b
4. Draw a flow graph for the following procedure
PROCEDURE average
.
i=1;
Total_input=Total_valid =0;
Sum=0;
DO WHILE value[i]<>999 AND Total_input<100
I ncrement Total_input by 1;
IF value[i]>=minimumAND value[i]<=minimum
THEN increment Total_valid by 1;
sum=sum+value[i]
ENDIF
increment i by 1;
END DO
IF Total_valid>0
THEN average=sum/Total_valid
ELSE average =-999;
ENDIF
END average

1
2 3
4
5 6
7
8
9
10
11
12
13
3
1
2
4
5
8
6
9
7
10
12
11
13
CC=16-12+2 =6
Path 1 : 1,2,10,11,13
Path2 : 1,2,10,12,13
Path3: 1,2,3,10,11,13
Path4 : 1,2,3,4,5,8,9,2
Path5 : 1,2,3,4,5,6,8,9,2
Path6 : 1,2,3,4,5,6,7,8,9,2
5. Assume that you are in charge of software development in
your company. You need more project managers. As you are
about to organise interviews, your task is to write a brief job
description for the project manager post. Identify the
criteria that you would include in the job description for this
post.
6. When in the software development process should one start
planning of :-
- acceptance testing
- integration testing
- module testing
- quality management
7. What are the documents which should be developed at the
Requirements Engineering stage of a software project?
Explain the contents of these documents.
Describe two process specification techniques.
Give three non-functional requirements. Explain how you
could specify them in an unambiguous way.

8. What is a software metric? Why they are important?
Give metrics for the following;
size of a project, code review, user-friendliness, reliability.
Explain how software metrics are used in Quality management
processes.

9. What is Operator Overloading?
A complex number (X) can be given as
X= R+iI
where R is the real part and I is the imaginary part. A class for
a complex number can be given as
COMPLEX NO
R
I
Set Real
Set Imaginary
Get real
Get imaginary
Give C++ code fragments to overload +
and operators as follows:
X1+X2= (R1+R2)+i(I1+I2)
X1-X2= (R1-R2)+i(I1-I2)

Class ComplexNumber
{
private:
float Real;
float Imaginary;
public:
ComplexNumber()
void setReal(float value);
void setImaginary(float value);
float getReal();
float getImaginary();
};

ComplexNumber::ComplexNumber()
{
Real=0;
Imaginary=0;
}

void ComplexNumber::setReal(float value)
{
Real=value;
}

void ComplexNumber::setImaginary(float value)
{
Imaginary=value);
}

float ComplexNumber::getReal()
{
return Real;
}

float ComplexNumber::getImaginary()
{
return Imaginary;
}

ComplexNumber operator + (ComplexNumber number-in)
{
float temp_real=Real+number_in.Real;
float temp_imaginary=Imaginary+number_in.Imaginary;
ComplexNumber temp_complex_number;
temp_complex_number.setReal(temp_real);
temp_complex_number.setImaginary(temp_imaginary);
return temp_complex_number;
}

ComplexNumber operator - (ComplexNumber number-in)
{
float temp_real=Real-number_in.Real;
float temp_imaginary=Imaginary-number_in.Imaginary;
ComplexNumber temp_complex_number;
temp_complex_number.setReal(temp_real);
temp_complex_number.setImaginary(temp_imaginary);
return temp_complex_number;
}

You might also like