Question: Q) Analyze the following code and then answer the questions: (Hint: Don not draw a CFG] A) Find the execution trace using the four test
![Don not draw a CFG] A) Find the execution trace using the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f450cc78edd_50066f450cc02c78.jpg)
Q) Analyze the following code and then answer the questions: (Hint: Don not draw a CFG] A) Find the execution trace using the four test cases given. [Hint: A is used for the main() function, B for the withdraw() function, and for the deposit() function] B) Assume that deposito function is changed to: (amount>0) return balance+amount: return balance-5; which test case(s) do we need to test the change made in deposito function? (10 Points) A public static void main(String() args) Int balance 1067 int amount-Integer.parseInt(arga111) 15 taroto.eraal tenor Canet Dalang Ethdraw famount balanced 2 else balanced FREE COUNS), balancen 3 System.out.println(lance balance 1 10 11 12 13 pubice statio int withdratant amount, int blande) B sramount balances to ECOND Lalance out 3 else Etuin balance 4 17 pune statie deperitat. ) 23 Ent> 1 Obat + 2 2 ESCUELLO 3 26 TE 1 duw amount 4, Exp-Balance #1000> +2.dw. amount=20, Exp-Balance 980 uchd", mount, Exp Balance 1000 tud", amount 100. Exp. balance 1100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
