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
Select the correct answer.
andriy [413]

Answer:

C. Rulers indicate the margins, tabs, and indents in a presentation slide.

Explanation:

The status bar appears at the bottom of the page, and it never displays options the options to style the slides. And the toolbar never displays the thumbnails of the slides, as well as the document area never provides a list of the commands for creating, formatting or editing the presentations. However, the rules do indicates the margins, tabs, and indents in a presentation slide. Hence C. is the right option.

8 0
3 years ago
What is resource Management in Wireless Communication ? Explain its Advantages?
Brut [27]

Answer:

Resource management is the system level transmission cellular networks and wireless communication.

Explanation:

Wireless communication is the process to continue to the address for faster response time,to the resource management.

Transmission is the provided by that more utilization and wireless resources available,and to discovered data.

Wireless communication system to demand the larger bandwidth and transmission using development to the system.

Wireless communication resources management the larger bandwidth and reliable transmission consumed all the system layer.

Resource management techniques tool are used in a preliminary concepts or mathematical tools,and average limited power battery.

Resource management are they necessary mathematical and fundamental tools are used in wireless communication.

Wireless communication in the provide that wireless industry in a wireless communication.

8 0
3 years ago
four quantum numbers that could represent the last electron added (using the Aufbau principle) to the Argon atom. A n = 2, l =0,
marshall27 [118]

Answer:

  • n = 3
  • l  = 1
  • m_l = 1
  • m_s=+1/2

Explanation:

Argon atom has atomic number 18. Then, it has 18 protons and 18 electrons.

To determine the quantum numbers you must do the electron configuration.

Aufbau's principle is a mnemonic rule to remember the rank of the orbitals in increasing order of energy.

The rank of energy is:

1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p < 5s < 4d < 5p < 6s < 4f < 5d < 6p < 7s < 5f < 6d < 7d

You must fill the orbitals in order until you have 18 electrons:

  • 1s² 2s² 2p⁶ 3s² 3p⁶   : 2 + 2 + 6 + 2 + 6 = 18 electrons.

The last electron is in the 3p orbital.

The quantum numbers associated with the 3p orbitals are:

  • n = 3

  • l = 1 (orbitals s correspond to l = 0, orbitals p correspond to l  = 1, orbitals d, correspond to l  = 2 , and orbitals f correspond to  l = 3)

  • m_l can be -1, 0, or 1 (from - l  to + l )

  • the fourth quantum number, the spin can be +1/2 or -1/2

Thus, the six possibilities for the last six electrons are:

  • (3, 1, -1 +1/2)
  • (3, 1, -1, -1/2)
  • (3, 1, 0, +1/2)
  • (3, 1, 0, -1/2)
  • (3, 1, 1, +1/2)
  • (3, 1, 1, -1/2)

Hence, the correct choice is:

  • n = 3
  • l  = 1
  • m_l = 1
  • m_s=+1/2
5 0
3 years ago
Who is credited with writing Google's famous page ranking search algorithm?
vaieri [72.5K]
Larry page is the correct answer :)
4 0
2 years ago
Suppose a book author can be identified by an AuthorID and each book can be identified by an ISBN. Besides the identifier, an au
Scrat [10]

Answer:

a) We know that atleast one or more author writes a book.

Symbol to indicate one or more is (B)

So the correct option is B

b) We know that zero to multiple books are written by any author.

Symbol to indicate zero or more is (A)

So the correct option is A

c) The fourth option is correct if we replace by many to many relationship and generate a new entity.

So the relationship betweem author and contract is one to many. So we know that there is atleast one author that represent in symbol d and books has atleast 0 that represent in symbol c.

So Fourth Option is correct d at blue side and c at red side.

d) There are two forirgn keys in table Contract one is from AuthorId and other is ISBN.

So correcct option is C

6 0
3 years ago
Other questions:
  • Design a class named QuadraticEquation for a quadratic equation ax^2+bx+x=0. The class contains: **private data fields a, b, and
    11·1 answer
  • Which categories format cells
    14·2 answers
  • Anyone wanna play roblox?? My user is Tsvetok_luis
    11·2 answers
  • You are informed that all the users within the network are unable to access the Internet. You decide to start troubleshooting fr
    12·1 answer
  • High capacity circuits are limited by the least capable network link, which is typically the user connection. As such, it is imp
    11·1 answer
  • Accepting criticism is a trait of what people?
    5·1 answer
  • Fill in each blank with the correct step from the fetch-execute cycle.
    14·1 answer
  • 2. Discuss CORBA functions<br><br>​
    6·2 answers
  • I dont uderstand dis my teacher no helping pls help me i need to understand TEch
    10·1 answer
  • What are some catchy names for computer basics that you would put on a childrens poster?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!