Given the following sample code written in Java programming language: double getGrossPay (double rate, double hrwkd)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 <= 0) grosspay = 0.0; else { int whole = (int) hrwkd; double frac = hrwkd whole; frac = 100* (Math.ceil (frac* 4) /4) ; hrwkd whole + frac/100; reghr = 0.0; othr= 0.0; reghr= 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 cuse() Sets of Nodes in the above data flow graph in tabular form. d. Give Predicates and puse() 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 alldefs selection criterion with respect to variable hrwkd. 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 <= 0) grosspay = 0.0; else { int whole = (int) hrwkd; double frac = hrwkd whole; frac = 100* (Math.ceil (frac* 4) /4) ; hrwkd whole + frac/100; reghr = 0.0; othr= 0.0; reghr= 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 cuse() Sets of Nodes in the above data flow graph in tabular form. d. Give Predicates and puse() 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 alldefs selection criterion with respect to variable hrwkd.
Expert Answer:
Answer rating: 100% (QA)
Check out the below explanation of th egiven question to get a clear idea about the question The giv... View the full answer
Related Book For
Elementary Statistics A Step By Step Approach
ISBN: 9780077665807
9th Edition
Authors: Allan G. Bluman
Posted Date:
Students also viewed these programming questions

Listing 4.3, GuessBirthday.java, gives a program for guessing a birthday. Write a JSF program that displays five sets of numbers, as shown in Figure 33.30a. After the user checks the appropriate...

From the Data Bank, select at least 30 subjects and construct a categorical distribution for their marital status. Draw a pie graph and describe briefly the findings. Data from Data Bank Appendix B...

Sketch the graph of the function and state its domain. f (x) = ln x

When you stand in shallow water and look at an object below the surface of the water, the object will look farther away from you than it really is. This is because when light rays pass between air...

1. Is the EEOCs role in combating age discrimination dependent on filing an age discrimination charge? 2. Did Congress intend to preserve an individuals right to a judicial forum in an ADEA case from...

Refer to the information in QS 134. Use that information for Tide Corporation to determine the 2016 and 2017 commonsize percents for cost of goods sold using net sales as the base. Data From QS...

Chapman Construction Company is a building contractor specializing in small commercial buildings. The company has the opportunity to accept one of two jobs; it cannot accept both because they must be...

4. Write as a single power, then evaluate. Express answers in rational form. a) V55 16 b) c) 284 7 18 (9) d) 2

Parent owns an 80% interest in Sub and at 12/31/11, Parent's investment in Sub on an equity basis was equal to 80% of Sub's stockholders' equity. During 2012, Sub sells inventory to Parent for...

Consider your current or previous place of work and complete a short evaluation of the corporate culture. What conclusions can you draw?

H. Cochran, Inc., is considering a new threeyear expansion project that requires an initial fixed asset investment of $2,350,000. The fixed asset will be depreciated straight line to zero over its...

Two golf balls are hit in the air at 66 feet per second (45 mi/hr), making angles of 37 degrees and 53 degrees with the horizontal. If the ground is level, estimate the horizontal distance traveled...

In a 1000  1250 word (45 page) paper discuss each of the seven family life cycles from the textbook. How important is each stage? What have we learned in this course that can help with...

1. Give me a specific example of a time when you usedgood judgment and logic in solving a problem? 2. Tell me a time when you had to carefully analyze a situation in order to be effective in guiding...

Azalea Seafood Gumbo Shoppe in 2004 John E, Gamble Urlif'CiNily OrS.01,11/7 Vahaina John Addison had just returned from lunch when his partner. Mike Rathle, remarked that WalMart's weekly order for...

A husband and wife were married in 1981 and had two children. They separated and began discussing divorce in 2013 when their children were 26 and 28 and had fulltime jobs. The couple came up with an...

What do you think?

From the Data Bank, select a random sample of at least 30 individuals, and test one or more of the following hypotheses by using the z test. Use = 0.05. a. For serum cholesterol, H 0 : = 220...

For Exercises follow these steps. a. State the hypotheses and identify the claim. b. Find the critical value(s). c. Compute the test value. d. Make the decision. e. Summarize the results. Use the...

For Exercises perform the following steps. a. Draw the scatter plot for the variables. b. Compute the value of the correlation coefficient. c. State the hypotheses. d. Test the significance of the...

Eugene Fama and Robert Shiller recently won the Nobel Prize in economics. Go to http://nobelprize.org/nobel_prizes/economics/ and locate the press release on Eugene Fama and Robert Shiller. What was...

Visit the Bloomberg Markets website at www.bloomberg.com/markets/stocks. Their interactive graph allows you to see cumulative returns for individual stocks as well as market indices. Over the last...

Compute the price of a share of stock that pays a \($5\) per year dividend and that you expect to be able to sell in one year for \($40\), assuming you require a 5% return.
Study smarter with the SolutionInn App