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
What is a characteristic of a wan hub-and-spoke topology?
olga nikolaevna [1]

The characteristic of the WAN hub and spoke topology is that it is considered to be a branch site or composed of the branch site in which they are likely to be connected to a site that is central and that is through the point to point links.

8 0
2 years ago
A new laptop was delivered to your home and left on the porch while you were at work. It is very cold outside, and you don't kno
kifflom [539]

Answer:

Let the computer warm up to room temperature before turning it on.

Explanation:

The laptop has been shipped to the user's home when he were at work and found on the deck. Outside it is really cool and he don't remember how long it has been there. Then, the user open his laptop and want to know whether it is functioning properly. Instead, let the machine warm up while switching it on to room temperature.

When a computer is still in a cold climate, they have to let it heat up to room temperature apx. 6-24 hours before switching it on. Otherwise, its heat the elements generate could cause water moisture within the laptop. That water could then harm elements of the system.

7 0
3 years ago
Which of the following is the smallest aperture (f-stop) opening?
Firlakuza [10]

Answer:

E) f/16

Explanation:

6 0
3 years ago
A form of brainstorming that serves as a visual aid to thinking laterally, helps explore a problem (usually by stating the probl
ELEN [110]

Answer:

The answer is BRAINSTORMING

Explanation:

<em>A visual aid to thinking laterally and exploring a problem, usually by stating the problem in the center  of the page and radiating outward spokes for components of the problem. Each component can then be considered separately with its own spokes, so that each point , thought, or comment is recorded.</em>

7 0
3 years ago
Suppose an 80286 microprocessor is in protected mode. How it is switched back
iris [78.8K]

Answer:

  hardware-initiated reset

Explanation:

Once in protected mode, the 80286 is designed to remain there until it is reset by hardware.

__

External hardware can be designed so that software can cause such a reset. In the 1984 PC/AT, such hardware combined with code in the BIOS allowed real mode re-entry and returned execution control to the program that caused the reset.

5 0
3 years ago
Other questions:
  • The component in a disk brake unit acts as a return spring and allows the pad to move a ay from the rotor is the
    6·1 answer
  • The part of the computer that contains the brain, or the central processing unit, also knows as the
    5·1 answer
  • A network that typically reaches a few meters, such as up to 10 meters (33 feet), and consists of personal devices such as mobil
    14·1 answer
  • I have wings, I am able to fly, I‘m not a bird yet I soar high in the sky. What am I?
    14·2 answers
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    9·2 answers
  • During a test, it is generally best to: A. answer all questions in order B answer the essay questions first C. answer the least
    7·2 answers
  • ساعدوني على الإجابة على هذه الأسئلة
    11·1 answer
  • Colleen has been missing a lot of work. She often calls in right as her shift is starting with some excuse about why she
    13·2 answers
  • Q.drtrdyudoijoemrkdf
    6·2 answers
  • Fill this blanks with the given words​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!