Question: java get a thumbs up :) Question 2. (16 pts, 2 cach) Part A: Consider the following method: public static boolean methodAcinta, int b 1f

Question 2. (16 pts, 2 cach) Part A: Consider the following method: public static boolean methodAcinta, int b 1f ( ac) 17 Cbce) return true; else return false; else return false; int ) Suppose you are writing a test method to test methodA. You include the following calls in the test method. Write the value that will be returned by each of the following three calls. 1. methodA(1, 2, 3) 11. methodA(3, 2, 1) 111. methodAC2, 1, 3) Tv. Write one sentence in English to describe what methodA accomplishes. v. Give a suggestion for an additional call to methodA that you would add to your test function to determine whether it works correctly. If you have no suggestion, write "nothing else is necessary." vi. Rewrite the body of methodA so that it does not use the if statement; rather it uses a return statement that return a Boolean Expression. Part B: Consider the following method: public static int methodB(int z) { return +50; Write the value that will be returned by each of the following expressions. i. methodB(methodB(methodB(10))) ii methodR0501*methodB/501
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
