1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleonysh [2.5K]
3 years ago
10

Import java.util.scanner; public class sumofmax { public double findmax(double num1, double num2) { double maxval; // note: if-e

lse statements need not be understood to // complete this activity if (num1 > num2) { // if num1 is greater than num2, maxval = num1; // then num1 is the maxval. } else { // otherwise, maxval = num2; // num2 is the maxval. } return maxval; } public static void main(string [] args) { double numa = 5.0; double numb = 10.0; double numy = 3.0; double numz = 7.0; double maxsum = 0.0;
Computers and Technology
1 answer:
jeyben [28]3 years ago
6 0

Here you go,


Import java.util.scanner

public class SumOfMax {

   public static double findMax(double num1, double num2) {

       double maxVal = 0.0;

       // Note: if-else statements need not be understood to

       // complete this activity

       if (num1 > num2) { // if num1 is greater than num2,

           maxVal = num1; // then num1 is the maxVal.

       }

       else { // Otherwise,

           maxVal = num2; // num2 is the maxVal.

       }

       return maxVal;

   }

   public static void main(String[] args) {

       double numA = 5.0;

       double numB = 10.0;

       double numY = 3.0;

       double numZ = 7.0;

       double maxSum = 0.0;

       /* Your solution goes here */

       maxSum = findMax(numA, numB); // first call of findMax

       maxSum = maxSum + findMax(numY, numZ); // second call

       System.out.print("maxSum is: " + maxSum);

       return;

   }

}

/*

Output:

maxSum is: 17.0

*/

You might be interested in
What is the function of a data bus
choli [55]

To gather data from its inputs

4 0
3 years ago
WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
Anna35 [415]

Answer:

SIR I AM A BRAINLT MODERRATER U CAN NOT POST THINGS LIKE THIS  I LOOKED THIS UP AND ITS A TEST

Explanation:

3 0
3 years ago
Discuss how the use of standard web component layouts and templates influences the visual design of a web page. In your opinion,
Amiraneli [1.4K]

Answer: The standard web component layouts and templates makes the web page seem like many others but could also make it easier for users to interact and use the web page without much trouble. The approaches do limit creativity and originality in web page design but its better to have an easy to use web page that can still look good rather than something that is confusing for the users.

Explanation:

8 0
4 years ago
How do you restore deleted notpad++ file?
Natasha2012 [34]
Check your trash can, if that doesnt work then I would say its lost.
3 0
3 years ago
What kind of company would hire an Information Support and Service employee?
andrew-mc [135]

Answer:

THE GANG IS A GANG AND A GANG IS A GANG

Explanation:

4 0
3 years ago
Other questions:
  • Perform online research and learn about the elements of a presentation program interface not discussed in the lesson. Write a sh
    9·1 answer
  • A network that operates without relying on a server is the ________ network.
    6·1 answer
  • Which naming scheme identifies the columns of a worksheet?
    12·1 answer
  • 2. How do web bugs invade a person’s privacy?
    10·2 answers
  • Roark has just joined a company and in his role as a lead analyst, he will be responsible for determining which systems developm
    11·1 answer
  • Which of the following is a potential hazard
    12·2 answers
  • A company has a website that has seen a large increase in visitors and they are concerned that if the trend continues, the web s
    13·1 answer
  • Select the correct answer.
    9·1 answer
  • New technology is NOT vital to businesses in which of the following ways?
    7·1 answer
  • All variables are----------------------------------------------- help please
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!