Given the following segment of code,
// postcondition:returns x + y public int add(int x, int y) {}
// postcondition:return x y public int multiply(int x, int y) {}
which of the following corresponds to this expression?
multiply(add(multiply(a, b), add(multiply(a, c), multiply(b, c))), 2)
1.a b + a c + b c 2
2.a b + a c + b c + 2
3.a b + (a c + b c)
4.(a b + a c + b c) 2
5.2 a b + (a c + b * c)
// postcondition:returns x + y public int add(int x, int y) {}
// postcondition:return x y public int multiply(int x, int y) {}
which of the following corresponds to this expression?
multiply(add(multiply(a, b), add(multiply(a, c), multiply(b, c))), 2)
1.a b + a c + b c 2
2.a b + a c + b c + 2
3.a b + (a c + b c)
4.(a b + a c + b c) 2
5.2 a b + (a c + b * c)