Question: In java Question 3) METHODs to our Madness: (Java) Use the pseudocode methods below to answer the questions starting on the next page. FIRST METHOD:

In java

Question 3) METHODs to our Madness: (Java) Use the pseudocode methods below to answer the questions starting on the next page.

FIRST METHOD:

COMMENT parameters should be integers

METHOD largestValue(parameters: num1, num2)

BEGIN

IF(num1 >= num2) THEN

result num1

ELSE

result num2

ENDIF

END largestValue

SECOND METHOD:

COMMENT parameters should be doubles

METHOD largestValue(parameters: num1, num2)

BEGIN

IF(num1 >= num2) THEN

result num1

ELSE

result num2

ENDIF

RETURN result

END largestValue

THIRD METHOD:

COMMENT parameters should be integers

METHOD largestValue(parameters: num1, num2, num3)

BEGIN

IF(num1 >= num2 AND num1 >= num3) THEN

result num1

ELSE IF (num2 >= num3) THEN

result num2

ELSE

result num3

ENDIF

RETURN result

END largestValue

Given the pseudocode methods above and on the previous page,which method corresponds to each of the method calls specified?

What would that method return based on the arguments listed?

If nothing would be returned, please write NO RETURN in the box.

A) CALL largestValue(3, 5, 3) - (10 points)

B) CALL largestValue(3, 5) - (10 points)

C) CALL largestValue(3.0, 5.5) - (10 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!