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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started