Sunteți pe pagina 1din 3

MODULE – III TUTORIAL QUESTIONS

B.E- CSE / B.Tech- IT Semester: V / Year: III


Course Code & Title: 18PD09/18PFD09 & Software Engineering
1.You are asked to test a module, using Black Box testing, which calculates the cost of buying cans of
beer from Zachariah’s Liquor Emporium. The basic cost per can is £1, but discounts are available for
bulk orders. If you order between 10 and 99 cans you qualify for a 10 % discount, while if you order
100 cans or more you qualify for a 20 % discount. The module should take as input the required
number of cans, and output the price of the order.
Display your test suite using the standard five column format: test case number, function tested, input,
expected output, and actual output (leave the final column blank at this stage).

2. The example given below throws light on how the techniques of this testing can be used to test the
specific software with given inputs

While considering a shopping scenario,

 Shop for $500 and receive a discount of 5%


 Shop for $1000 and receive a discount of 7%
 Shop for $1500 or more and receive a discount of 10%

With the help of Equivalence partitioning technique of this testing, it is possible to divide inputs as
four partitions, amount less than 0, 0 – 500, 501 – 1000, 1001 – 1500 and so on. The details such as
the maximum limit for shopping and the product details will not be considered by this testing
technique.

3. For a software that computes the square root of an input integer which can assume values in the
range of 0 to 5000, there are three equivalence classes: The set of negative integers, the set of integers
in the range of 0 and 5000, and the integers larger than 5000. Therefore, the test cases must include
representatives for each of the three equivalence classes and a possible test set can be: {-5,500,6000}.
4. Design the black-box test suite for the following program. The program computes the intersection
point of two straight lines and displays the result. It reads two integer pairs (m1, c1) and (m2, c2)
defining the two straight lines of the form y=mx + c. The equivalence classes are the following: •
Parallel lines (m1=m2, c1≠c2) • Intersecting lines (m1≠m2) • Coincident lines (m1=m2, c1=c2) Now,
selecting one representative value from each equivalence class, the test suit (2, 2) (2, 5), (5, 5) (7, 7),
(10, 10) (10, 10) are obtained.
5. Assume that the size of an organic type software product has been estimated to be 32,000 lines of
source code. Assume that the average salary of software engineers be Rs. 15,000/- per month.
Determine the effort required to develop the software product and the nominal development time.
6. A company needs to develop digital signal processing software for one of its newest inventions.
The software is expected to have 40000 lines of code. The company needs to determine the effort in
person-months needed to develop this software using the basic COCOMO model. The multiplicative
factor for this model is given as 2.8 for the software development on embedded systems, while the
exponentiation factor is given as 1.20. What is the estimated effort in person-months?
7. A company needs to develop a strategy for software product development for which it has a choice
of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is
estimated to be twice the LOC developed with Ll. The product will have to be maintained for five
years. Various parameters for the company are given in the table below.
Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for
which the cost of the project using L1 is equal to the cost of the project using L2?
8. A software test engineer is assigned the job of doing black box testing. He comes up with the
following test cases, many of which are redundant.
This function computes the roots of a quadratic equation
a.x^2 + b.x + c = .The function stores two real roots
in *root1 and *root2 and returns the status of validity
of roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discreminant is positive
(iii) When discriminant is zero
(iv) When discriminant is negative.
Only in case (ii) and (iii) the stored roots are valid.
Otherwise 0 is stored in roots. The function returns
0 when the roots are valid and -1 otherwise.
The function also ensures root1 >= root2
int get_QuadRoots( float a, float b, float c,
float *root1, float *root2);

9. The cyclomatic complexity of each of the modules A and B shown below is 10. What is the
cyclomatic complexity of the sequential integration shown on the right hand side?
10. Consider a software program that is artificially seeded with 100 faults. While testing this
program, 159 faults are detected, out of which 75 faults are from those artificially seeded faults.
Assuming that both real and seeded faults are of same nature and have same distribution, the
estimated number of undetected real faults
11. Consider a software project with the following information domain characteristic for calculation
of function point metric.
Number of external inputs (I) = 30
Number of external output (O) = 60
Number of external inquiries (E) = 23
Number of files (F) = 08
Number of external interfaces (N) = 02
It is given that the complexity weighting factors for I, O, E, F and N are 4, 5, 4, 10 and 7, respectively.
It is also given that, out of fourteen value adjustment factors that influence the development effort,
four factors are not applicable, each of he other four factors have value 3, and each of the remaining
factors have value 4. The computed value of function point metric.
12. A software was tested using the error seeding strategy in which 20 errors were seeded in the code.
When the code was tested using the complete test suite, 16 of the seeded errors were detected. The
same test suite also detected 200 non-seeded errors. What is the estimated number of undetected
errors in the code after this testing?
13. A simple stand – alone software utility is to be developed in ’C’ programming by a team of
software experts for a computer running Linux and the overall size of this software is estimated to be
20,000 lines of code. Considering (a, b) = (2.4, 1.05) as multiplicative and exponention factor for the
basic COCOMO effort estimation equation and (c, d) = (2.5, 0.38) as multiplicative and exponention
factor for the basic COCOMO development time estimation equation, approximately how long does
the software project take to complete ?
14. A software project was estimated at 352 Function Points (FP). A four person team will be
assigned to this project consisting of an architect, two programmers, and a tester. The salary of the
architect is ` 80,000 per month, the programmer ₹ 60,000 per month and the tester ₹ 50,000 per
month. The average productivity for the team is 8 FP per person month. Which of the following
represents the projected cost of the project ?
15. The test suite (set of test input) used to perform unit testing on module could cover 70% of the
code. What is the reliability of the module if the probability of success is 0.95 during testing?

S-ar putea să vă placă și