Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

List the types of E-R diagrams.

Answered: 1 week ago

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago