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
Arisa [49]
3 years ago
13

I need to create a method named "root positive". which will either print the square root of the number passed to it or if the nu

mber is less than zero, it will print out the statement "Number must not be negative."?
1. Ask the user to input a number of type double which you will find the square root of the number.

2. Create a method called rootPositive which will either print the square root of the number passed to it or if the number is less than zero, it will print out the statement "Number must not be negative.".

3. Call your rootPositive method and pass to it the number the user enetered.
Computers and Technology
1 answer:
rjkz [21]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java. It is a method that calculates the square root of a number as requested. The method first checks with an IF statement if the parameter value is a positive number and then calculates the square root and prints it to the screen. Otherwise, it prints Number must not be negative. A test case has been provided in the main method and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter a number of type double to calculate square root:");

       double num = in.nextDouble();

       rootPositive(num);

   }

   public static void rootPositive(double num) {

       if (num > 0) {

           System.out.println(Math.sqrt(num));

       } else {

           System.out.println("Number must not be negative.");

       }

   }

}

You might be interested in
An organization requires secure configuration baselines for all platforms and technologies that are used. If any system cannot c
Romashka [77]

Answer:

C. Process a risk acceptance for 2633 and remediate 3124.

Explanation:

There are various business risks. Some are inherited risks while other are risks are associated with nature of business. It is dependent on business owners that they want to accept risk or mitigate the risk. Risk acceptance is based on the strategy of the management. In the given scenario Accounting Prod Production has low risk 2633 which is accepted while 3124 is high risk which is remediated.

8 0
3 years ago
Given variables first and last, each of which is associated with a str, representing a first and a last name, respectively. Writ
valentina_108 [34]

Answer:

The python code is attached

Explanation:

  1. I defined a function called Fullname
  2. The function accepts 2 parameters first and last
  3. last[0] gives the first letter of the last variable
  4. last[0].upper() modifies the first letter as upper letter
  5. same applied to variable first
  6. + sign concatenates strings and variables to the variable name
  7. the function returns the variable name

5 0
3 years ago
Rubbing two sticks together to make a fire is an example what
Jet001 [13]
Rubbing two sticks together will cause friction
7 0
3 years ago
Read 2 more answers
What is the ribbon in the word document
adoni [48]

Answer:

The Ribbon is a user interface element which was introduced by Microsoft in Microsoft Office 2007. It is located below the Quick Access Toolbar and the Title Bar. It comprises seven tabs; Home, Insert, Page layout, References, Mailing, Review and View. Each tab has specific groups of related commands

Explanation:

8 0
3 years ago
Que es pilar en tecnologia
Semmy [17]
Wikipedia:The thermal copper pillar bump, also known as the "thermal bump", is a thermoelectric device made from thin-film thermoelectric material embedded in flip chip interconnects (in particular copper pillar solder bumps) for use in electronics and optoelectronic packaging, including: flip chip packaging of CPU and GPU integrated circuits (chips), laser diodes, and semiconductor optical amplifiers (SOA). Unlike conventional solder bumps that provide an electrical path and a mechanical connection to the package, thermal bumps act as solid-state heat pumps and add thermal management functionality locally on the surface of a chip or to another electrical component. The diameter of a thermal bump is 238 μm and 60 μm high.

The thermal bump uses the thermoelectric effect, which is the direct conversion of temperature differences to electric voltage and vice versa. Simply put, a thermoelectric device creates a voltage when there is a different temperature on each side, or when a voltage is applied to it, it creates a temperature difference. This effect can be used to generate electricity, to measure temperature, to cool objects, or to heat them.

For each bump, thermoelectric cooling (TEC) occurs when a current is passed through the bump. The thermal bump pulls heat from one side of the device and transfers it to the other as current is passed through the material. This is known as the Peltier effect.[1] The direction of heating and cooling is determined by the direction of current flow and the sign of the majority electrical carrier in the thermoelectric material. Thermoelectric power generation (TEG) on the other hand occurs when the thermal bump is subjected to a temperature gradient (i.e., the top is hotter than the bottom). In this instance, the device generates current, converting heat into electrical power. This is termed the Seebeck effect.[1]

The thermal bump was developed by Nextreme Thermal Solutions as a method for integrating active thermal management functionality at the chip level in the same manner that transistors, resistors and capacitors are integrated in conventional circuit designs today. Nextreme chose the copper pillar bump as an integration strategy due to its widespread acceptance by Intel, Amkor and other industry leaders as the method for connecting microprocessors and other advanced electronics devices to various surfaces during a process referred to as “flip-chip” packaging. The thermal bump can be integrated as a part of the standard flip-chip process (Figure 1) or integrated as discrete devices.

The efficiency of a thermoelectric device is measured by the heat moved (or pumped) divided by the amount of electrical power supplied to move this heat. This ratio is termed the coefficient of performance or COP and is a measured characteristic of a thermoelectric device. The COP is inversely related to the temperature difference that the device produces. As you move a cooling device further away from the heat source, parasitic losses between the cooler and the heat source necessitate additional cooling power: the further the distance between source and cooler, the more cooling is required. For this reason, the cooling of electronic devices is most efficient when it occurs closest to the source of the heat generation.

Use of the thermal bump does not displace system level cooling, which is still needed to move heat out of the system; rather it introduces a fundamentally new methodology for achieving temperature uniformity at the chip and board level. In this manner, overall thermal management of the system becomes more efficient. In addition, while conventional cooling solutions scale with the size of the system (bigger fans for bigger systems, etc.), the thermal bump can scale at the chip level by using more thermal bumps in the overall design.

4 0
2 years ago
Other questions:
  • Which change signaled a musical progression toward rock and roll?
    14·1 answer
  • To begin importing data from an excel spreadsheet, click on the ____ tab on the ribbon.
    11·1 answer
  • is there an app i can use to make a picture appear in the corner of a video then disappear after being up for a second?
    6·2 answers
  • What is the purpose of the operating system's processor management function?
    14·1 answer
  • Create the logic for a program that prompts a user for 12 numbers and stores them in an array. Pass the array to a method that r
    8·1 answer
  • 2. How is accessing the Internet through a home network and public Wi-Fi similar?​
    15·1 answer
  • Part 2: Code the Program
    12·1 answer
  • Responsible use of computer is known as ................. .​
    11·1 answer
  • Your friends are having difficulties with their computer setups. Can you suggest a way to help each friend?
    5·1 answer
  • A software giant is enabling a city with smart parking, using real-time information captured by sensors on the vehicle and senso
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!