You are on page 1of 2

School of Computing Science and Engineering

Term End Lab Examination - TUESDAY, 3rd April 2018

Programme : MS(Software Engineering) Semester : Win 18


Course : SOFTWARE METRICS LAB Code : SWE 506
Faculty : Slot(s) :
Dr. E. Umamaheswari L11+L12+L23
+L24

1. a. A DVD that carries some sensitive information in the form of files. Source1.txt
and Source2.txt have information that has to be copied to the hard disk of
another computer. Write a Java application that takes data from source1.txt
from 15th Character to entire length and all the information from file
source2.txt has to be copied to Destination.txt. Display the copied information
in Upper case format. Calculate number of statements/function and complexity
using “Source monitor” tool. [20]

b. Write a program to compute Cyclomatic Complexity for the above


program.[20]

c. Viva[10]

2.
a. Assume that Olympics apartment is under construction. The civil engineer
wants to make a soft copy of the payment made to its worker. Write a program
in C or C++ to help him. It should have a function called “payment” that
calculates the wages of employees if the number of hours worked is less than 72
and fixed hourly pay rate. Use the same function name to calculate the amount
if number of hours worked is more than 72, are to be paid at the rate of one
and half times more than the regular pay rate. Use the above function in the
main program and include necessary information to calculate the payment for
5 employees. Compute the Halstead Metrics for the code.[20]

b. Design JUNIT Test cases and perform coverage analysis and also for the same
program perform Rational Purify.[20].

c. VIVA[10]

Page 1 of 2
3.
a. Ram has a pen drive with 2Gb of storage capacity. It has 1Gb of software,
800Mb of official files and 218Mb of personal data. His going to avail two days
leave even though he has some important assignments in his work to complete.
So he wants to copy three files related to his work from office in his pen drive.
The size the files he wants to copy are 5000Kb, 1Mb, 1067Kb.Write a program
using object oriented concept to calculate the total capacity of the pen drive in
terms of Kb and while copying the files if it in turn runs out of memory suggest
him to handle this situation. Design JUNIT Test cases and perform coverage
analysis and also for the same program perform Rational Purify.[20]

b. Perform the cost estimation using the “Constructive Cost Estimation model”
for all the categories of project type for intermediate model stage. Assume that
the LOC is 64000, average salary of the developers is 30,000 and testers are
32,000 per month. Compare it with the COSMOS tool.[20]

c. VIVA[10]

4. a. Consider a computer showroom which maintains the stock in their showroom.


Get the product code, price and quantity. The price of the product changes
every day. Increase or decrease the price of the product by receiving the
corresponding product code and the price which to be changed. Use function
and pass the product code as the pointer argument in order to make the
changes in the price. Display the product details that has the changes in the
price. Write a program in C,C++ or Java and calculate the information flow
metrics.[20]

b. Given are the times, in seconds, that 15 people waited to be served at Rose’s
garden centre. 5 9 11 14 15 20 22 25 27 27 28 30 32 35 44 . Write a
program to calculate box plot for this information.[20]

c. VIVA[10]

**************

Page 2 of 2

You might also like