Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 ( a ) All Paths Coverage and Control Flow Graphs [ 2 5 marks ] [ 8 marks ] public static Status freeDelivery (

3(a) All Paths Coverage and Control Flow Graphs
[25 marks]
[8 marks]
public static Status freeDelivery
(long rewardPoints, boolean localCustomer)
{
Status rv = Status. INVALID;
long limit = localCustomer ?80:120;
long jumplimit = localCustomer ?20:40;
if ( rewardPoints >0){
if (rewardPoints jumpLimit)
rewardPoints -= limit;
if (rewardPoints > jumpLimit)
rewardPoints -= limit;
rewardPoints jumpLimit );
if (rewardPoints > limit)
rv= Status.FREE_DEL;
else
rv = Status. CHARGE_DEL;
}
return rv;
}
29
30
33..34
32
36..37
35
38..41
Using the all paths coverage and control flow graphs techniques, correctly connect the nodes given in the right-hand side of the above figure. To do so, use the code given in the lefthand side of the above figure.
Correctly answer the following answer to gain the marks
i. What node or nodes are reached from Node (31)?
ii. What node or nodes are reached from Node (33..34)?
iii. What node or nodes are reached from Node (32)?
iv. What node or nodes are reached from Node (36..37)?
(b) Correctly answer the following to gain the marks
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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

Students also viewed these Databases questions

Question

Are summer stipends available?

Answered: 1 week ago

Question

=+a. Consumer-Focused show benefits.

Answered: 1 week ago