Given the method implementation, do the following: int CalculateDeviation(int x, int y) { a int total=0; b if (x>30) { c

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Given the method implementation, do the following: int CalculateDeviation(int x, int y) { a int total=0; b if (x>30) { c

Post by answerhappygod »

Given the method implementation, do the following:
int CalculateDeviation(int x, int y) {a int total=0;b if (x>30) {c total=(x*40+y*50)*.95; }d for (int i=0;i<y;i++) {e total+=y*5; }f return total;}
(a) Draw the flow graph corresponding to the methodCalculateDeviation. [4 marks]
(b) Describe the minimum set of paths (or test cases) throughthe flowgraph that is adequate for statement coverage but notedge/branch coverage. [4 marks]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply