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]
Given the method implementation, do the following: int CalculateDeviation(int x, int y) { a int total=0; b if (x>30) { c
-
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!