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 computer connected to the Internet that asks for data is a(n) ________. Select one: A. server B. client C. aggregator D. surro
madreJ [45]

Answer:

client

Explanation:

The client makes a request for a service, and a server performs that service.

7 0
4 years ago
This algorithm requires you to find the perimeter of 12 different squares.
k0ka [10]

Answer:

BEGIN

SET count = 1

WHILE count <= 12 THEN

     INPUT length

     perimeter = length * length

     PRINT perimeter

END WHILE

END

Explanation:

You can also set count to 0 and in while loop use count < 12 to loop just 12 times just as above

4 0
3 years ago
In a clustered column chart, the names of each column are part of the ____ series. select one:
Ratling [72]
Data.......;...............;.........;......;.
4 0
3 years ago
Read 2 more answers
Your auto insurance policy has a $200 monthly premium and $700 deductible. what is the maximum amount you will have to pay out o
saul85 [17]
Your monthly premium is the payment you make to your car insurance company that keeps your coverage active.

A car insurance deductible is the amount of money you have to pay toward repairs before your insurance covers the rest.

Therefore $700 is the maximum amount you will have to pay
<span>out of pocket for a car accident before your insurance covers your cost.</span>
4 0
3 years ago
Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
larisa [96]
I think this answer is b
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is where you can save, select a template, change document properties, and close or exit excel?
    8·1 answer
  • Explain any two computer technologies that has improved e commerce
    11·1 answer
  • You need a collection to represent secret agents. Every agent has a unique codename that identifies them, and an Agent object th
    14·1 answer
  • Define a member function PrintAll() for class PetData that prints output as follows. Hint: Make use of the base class' PrintAll(
    8·1 answer
  • Which key combination should you use
    9·2 answers
  • Computer hardware refers to: Group of answer choices the mechanism through which users interact with a computer. handheld comput
    13·1 answer
  • I NEED INFORMATION ON THE WALT DISNEY VS. FADEN CASE ASAP<br> WILL GIVE BRAINLIEST
    8·2 answers
  • n (m,n) correlating branch predictor uses the behavior of the most recent m executed branches to choose from 2m predictors, each
    11·1 answer
  • _____ use patterns to find solutions instead of using the if-then-else rules that expert systems use.
    13·1 answer
  • A(n) _____ is a computerized system by which subscribers are able to communicate to all other subscribers by sending a transmiss
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!