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
1. What are the biggest risks when using the public Internet as a Wide Area Network (WAN) or transport for remote access to your
enyata [817]

Answer:

The problems or risk when using a WiFi is that, hackers often have the ability to position themselves between the user and the end point connection. and once these hackers gains access to your information and privacy, u might lose important documents or contents.

It is of utmost importance that when an end user is using a public WiFi as a WAN, he/she must ensure to browse with VPN turned on, and the sharing options turned off.

Explanation:

Solution

One of the biggest risk with public WiFi is the ability or capacity for hackers to position themselves between you (user) and the point of connection. so instead of communicating directly with the hotpot, at several times you end up sending your information to the hacker.

The hacker also have access or privileges to every information you send out such as credit card information, emails and so on. once the hacker gains access to that information, you run into trouble.

As an end user when making use of public WiFi to ensure to browse with VPN (Virtual private Network) on and turned off sharing options

4 0
3 years ago
How does an individual's access to a wide range of online services affects their ability to operate safely in the digital world.
S_A_V [24]
Nothing online is safe anymore!!!! People and even the government can get hacked easily with today's technology.You can search someone easily on websites like Google or Facebook and even read someone's tweets on Twitter because their account is not private. But what's the point of saying private if they can easily get hacked by someone. There is no safety these days that is why you have to be careful with what you post on the internet in general.
6 0
3 years ago
A Turing machine with doubly infinite tape (TMDIT) is similar to an ordinary Turing machine except that its tape is infinite to
umka2103 [35]

Answer and Explanation:

A TM with doubly infinite tape can simulate an ordinary TM. It marks the left-hand end of the input to detect and prevent the head from moving off of that end. To simulate the doubly infinite tape TM by an ordinary TM, we show how to simulate it with a 2-tape TM, which was already shown to be equivalent in power to an ordinary

TM. The first tape of the 2-tape TM is written with the input string, and the second tape is blank. We cut the tape of the doubly infinite tape TM into two parts, at the starting cell of the input string. The portion with the input string and all the blank spaces to its right appears on the first tape of the 2-tape TM. The portion to the left of the input string appears on the second tape, in reverse order.

3 0
3 years ago
Question 18
beks73 [17]

Answer:

None

Explanation:

Logical operators:

'and' indicates that the statement is true if both conditions are true.

'or' indicates that the statement is true if one or both conditions are true.

Given that a = 1 and b = 10:

The first statement is false (1×10 <= 1 is false, 1 >= 10 is also false)

The second statement is false (1>10 is false, a does not equal b)

The third statement is false (a does not equal b)

None of these statements are true.

Hope this helps :)

8 0
3 years ago
Por favor alguem poderia me falar se este Computador Gamer Fox PC FPS Intel Core i5 8GB 3.4 GHZ GeForce GTX 1050Ti 4GB GDDR5 HD
AleksAgata [21]

thats an trash computer

5 0
3 years ago
Other questions:
  • How does soil lose its value? A.When the top soil is stripped by wind or water B.When the bedrock is damaged by animals C.When w
    15·1 answer
  • PLEASE HELP
    12·2 answers
  • What is the answer to this question on the thing I'm doing in apex
    6·1 answer
  • Let's say that you're the sole IT person in your company, and your boss wants a way to block certain websites from employees. Wh
    6·2 answers
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • What do you use for soaking hands and holding soapy water​
    7·2 answers
  • 3. Write a program that inputs 4 hexadecimal digits as strings (example 7F), converts the string digits to a long – use strtol(i
    11·1 answer
  • If a stop-and-wait protocol is used, what is the fraction of time, in seconds, that the sender is busy sending bits into the cha
    8·1 answer
  • Which element can be changed using the Print pane? Check all that apply
    9·1 answer
  • Comment if u wanna text me on behance
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!