Question: Given the following sample code written in Java programming language: double getGrossPay (double rate, double hrwkd) { 01 02 03 04 05 06 07
Given the following sample code written in Java programming language: double getGrossPay (double rate, double hrwkd) { 01 02 03 04 05 06 07 OOOO 08 09 10 11 TT HNM 12 13 14 15 16 1441 4567OHi1000 OH 17 18 19 20 21 WWNNNNNNNNN 22 23 24 25 26 27 28 29 30 31 } final double OTR = 1.5; double reghr = 0.0, regpay = 0.0; double othr= 0.0, otpay = 0.0; double holhr = 0.0, holpay. = 0.0; double grosspay = 0.0; if (hrwkd 40) { reghr = 40; othr = hrwkd - 40; } else { reghr hrwkd; othr = 0; } otpay other * OTR * rate; regpay reghr* rate; grosspay = regsPay + otpay; } return grosspay; a. Draw the data flow diagram. Find all the anomalies along with their type in the above code. b. Find an infeasible path (if exists) in the data flow graph for the getGrossPay method. c. Give all the Def and c-use() Sets of Nodes in the above data flow graph in tabular form. d. Give Predicates and p-use() Set of Edges in the above data flow graph in tabular form. e. By referring to the data flow graph obtained above, find a set of complete paths satisfying the all-defs selection criterion with respect to variable hrwkd.
Step by Step Solution
3.35 Rating (161 Votes )
There are 3 Steps involved in it
Check out the below explanation of th egiven question to get a clear idea about the question The giv... View full answer
Get step-by-step solutions from verified subject matter experts
