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
vovikov84 [41]
3 years ago
9

Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a pr

ogram that takes two integer inputs, and outputs the largest magnitude value.Ex: If the inputs are:5 7the method returns:7Ex: If the inputs are:-8 -2the method returns:-8Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math method.Your program must define and call a method:public static int maxMagnitude(int userVal1, int userVal2)What I have so far:import java.util.Scanner;public class LabProgram {/* Define your method here */public static void main(String[] args) {/* Type your code here */}
Computers and Technology
1 answer:
klio [65]3 years ago
6 0

Answer:

See the code snippet below

Explanation:

import java.util.Scanner;

public class LabProgram{

     public static void main(String[] args){

          Scanner scan = new Scanner(System.in);

          System.out.println("Please enter first number: ");

          int firstNumber = scan.nextInt();

          System.out.println("Please enter second number: ");

          int secondNumber = scan.nextInt();

          maxMagnitude(firstNumber, secondNumber);

}

     public static int maxMagnitude(int firstValue, secondValue){

         System.out.println(Math.max(firstValue, secondValue));

}

}

You might be interested in
A(n) _________________________ conveys a visual representation of data.
Komok [63]
I believe that the answer to fit this sentence is chart. Hope that this answer helped! ☺
3 0
4 years ago
What dose a compress pictures command do ?
Nataliya [291]

Answer: I reduces the size

Explanation: cropped areas of pictures are saved by default, which adds to the file size. If your using PowerPoint then it can reduce the file size by compressing pictures, like lowering their resolution, and deleting cropped areas.

3 0
3 years ago
What is the Load in a flashlight? Give two other examples of “Loads”. plz help me
Arlecino [84]

Answer:

Like a load of batteries

Explanation:

" I have a load of crayons", "I found a load of tires". Hope this helps

4 0
3 years ago
If you are in the Slide Master view, what are the steps to add headers and footers?
Marta_Voda [28]

Answer:

THat is the correct order.

Explanation:

6 0
2 years ago
Which of the following best describes open source software?
sp2606 [1]
What was the options they gave you?
5 0
3 years ago
Read 2 more answers
Other questions:
  • The ease of travel in the twentieth century played a role in the advancement of medicine. Based on this lesson, which statement
    5·2 answers
  • Question 1 of 40
    12·1 answer
  • Consider a binary-search method in an array that reports whether an object is in the array. The documentation indicates that the
    11·1 answer
  • Design and implement an algorithm that gets as input a list of k integer values N1, N2,..., Nk as well as a special value SUM. Y
    12·1 answer
  • The Mark Table of Contents Entry option is used for marking nonheading text for the table of contents. the options are manually
    5·2 answers
  • Why might a business choose a server-based network over a peer-to-peer network?
    15·1 answer
  • What is it called when you remove some information from a file or remove a file from the disk ? A) save b) delete c) edit d) rem
    5·1 answer
  • If Anyone can help me out that'll be great
    11·1 answer
  • The Internet is a worldwide communications network. Which device connects computer networks and computer facilities?
    11·1 answer
  • Please help me on this it’s due now
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!