Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 1 : What would be the Cyclomatic complexity of the following program? int find - maximum ( int i , int j , int

Q1: What would be the Cyclomatic complexity of the following program?
int find-maximum(int i,int j, int k){
int max;
if )>(j then
if )>(k then max=i;
else max=k;
else if )>(k
else max=k;
return(max);
}Draw a Control Flow Graph to compute the Cyclomatic complexity of the above program.
MAY 14,2022
Q2: Solve the following problem:
The following source code retyrns the longest substring that appears at both the beginning and end of the string without overlapping.
For example: sameEnds("abXab") returns "ab".
01 public String sameEnds (String string)
02 intlen = string.length();
03 String fin ="";
04 String tmp =";
05
06 for (int i=0; +===i tmp;
11
12 returnfin;
13
Draw the control-flow graph (CFG) of the source code above
Q3: This program computes x to the power of y, where x and y are integers.
INPUT: The x and y values.
OUTPUT: x raised to the power of y is printed.
1 void pow (int x,y)
{
float z;
int p;
if )(0
p=0-y;
else p=y;
z=1.0;
while )(0
{
z=z***x;
p=p-1;
}
if )(0
z=1.0z;
System.out.print (z) ;
}
a) Draw a control flow graph for this program fragment. Use the node numbers given above.
b) List the du-Path for variable x.
c) List the du-Path for variable y.
Q4: Consider the following scenario:
Consider a function implementing the following policy for awarding merit cum means scholarship to the students. No students would be considered for the scholarship if he is in receipt of any other scholarship or if he is having a backlog in any subject. Further, the parental income must be less than 100K per year and the student's current CGPA must be at least 7.
However, a student with parental income upto 200K may be awarded the scholarship, if his/her current CGPA is at least 8. At least how many test cases are required for conditional testing? [You may need to create a decision table for answering the above scenerio]
Q5. As you have already tested HRM (open source project) and have created bug report manually. Use Bugzilla which is an open-source issue/bug tracking system that allows developers to keep track of outstanding problems with their product.
Key features of Bugzilla includes:
Advanced search capabilities, E-mail Notifications, Modify/file Bugs by e-mail, Time tracking, Strong security, Customization, Localization.
In this part, you must perform the following tasks:
Log-in to Bugzilla account
Creating a BugReport
Create graphical reports
Important:
Reports of already-reported bugs will not qualify for grade. 2. I will not base the decision on personal demonstrations of bugs. If the bug report, as written seems unclear, confusing, or insignificant, it does not qualify. The grade is for the report, not for the bug.
Send me the bug number to identify the bugs. (and screenshots of the above 3 points)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions