Question: It is Java A5.9.2: Method call in expression CHALLENGE ACTIVITY Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use


It is Java
A5.9.2: Method call in expression CHALLENGE ACTIVITY Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call findMax0 twice in an expression. 1 import java.util.Scanner; 3 public class SumOfMax 4 public double findMax(double num1, double num2) t double maxVal; INote: if-else statements need not be understood to I complete this activity if (numl num2) // if num1 is greater than num2, maxVal numi; then num1 is the maxVal. 12 else /Otherwise, maxVal num2; II num2 is the maxVal. 14 15 16 17 return maxVal; 18 public static void main(String [1 args) double numA = 5.0; double numB 10.0; double numY3.0; double num2 7.0; double masum 0.0; 20 21 23 24 25 26 27 28 /I Use object maxFinder to cal1 the method SumOfMax maxFindernew SumOfMax) Your solution goes here/ is: maxSun); 30 31 32 System . out . print("maxSum " + Run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
