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
Ilia_Sergeevich [38]
2 years ago
9

Rewrite the following condition to avoid a possible arithmetic exception:

Computers and Technology
1 answer:
dangina [55]2 years ago
4 0

Answer:

if (x > 7 && Math.sqrt(x) < 3)

Explanation:

The previous condition checks if the square root of x is less than 3, but this would raise an error if x is a value equal to or less than 0.

So, the condition checks for the value of x before evaluating the square root after the AND operation to prevent an arithmetic exception.

You might be interested in
After Lola gave her friend the password to a protected website, her friend was able to remember it only long enough to type it i
Naily [24]

Answer:

Short term memory

Explanation:

Is the capacity an individual has to hold on to a small amount of information for a short period of time without altering it, it is used to remember information like phone numbers, passwords etc. It is also known as primary or active memory.

If short time memories is not rehearsed, they don't last and are easily forgotten, they actually last for about 20-30 seconds.

Aspects of short term memory :

1. Limited capacity : in a short term memory at most 7 items can be stored at a time.

2. Limited capacity : information is short lived and can be lost through distraction and with time.

3. Encoding.

4 0
3 years ago
Choose the missing term.
qaws [65]

Answer:

import

Explanation:

the <em>import </em>keyword is used to import external modules into a python script.

6 0
2 years ago
In this lab, you will create a programmer-defined class and then use it in a Java program. The program should create two Rectang
prohojiy [21]

Answer:

class Rectangle{

//private attributes of length and width

private double givenLength;

private double givenWidth;

// constructor to initialize the length and width

public Rectangle(double length, double width){

 givenLength = length;

 givenWidth = width;

}

// setter method to set the givenlength

public void setGivenLength(double length){

 givenLength = length;

}

// setter method to set the givenWidth

public void setGivenWidth(double width){

 givenWidth = width;

}

// getter method to return the givenLength

public double getGivenLength(){

 return givenLength;

}

// getter method to return the givenWidth

public double getGivenWidth(){

 return givenWidth;

}

// method to calculate area of rectangle using A = L * B

public void calculateArea(){

 System.out.println("The area of the rectangle is: " + getGivenLength() * getGivenWidth());

}

// method to calculate perimeter of rectangle using P = 2 * (L + B)

public void calculatePerimeter(){

 System.out.println("The perimeter of the rectangle is: " + 2 * (getGivenLength() + getGivenWidth()));

}

}

public class MyRectangleClassProgram{

public static void main(String args[]){

//rectangle1 object is created

Rectangle rectangle1 = new Rectangle(10.0, 5.0);

//rectangle2 object is created

Rectangle rectangle2 = new Rectangle(7.0, 3.0);

//area for rectangle1 is calculated

rectangle1.calculateArea();

//perimeter for rectangle1 is calculated

rectangle1.calculatePerimeter();

//area for rectangle2 is calculated

rectangle2.calculateArea();

//perimeter for rectangle2 is calculated

rectangle2.calculatePerimeter();

}

}

Explanation:

Two file is attached: Rectangle.java and MyRectangleClassProgram.java

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
7 0
3 years ago
Write a paragraph about ICT in personal life?
melisa1 [442]

Answer:

Information and communications technology (ICT) is an extensional term for information technology (IT) that stresses the role of unified communications[1] and the integration of telecommunications (telephone lines and wireless signals) and computers, as well as necessary enterprise software, middleware, storage and audiovisual systems, that enable users to access, store, transmit, and manipulate information.

6 0
2 years ago
Tomahawk Industries develops weapons control systems for the military. The company designed a system that requires two different
mojhsa [17]

Answer:

<em>D. Separation of duties</em>

Explanation:

Separation of duties (SoD) is a fundamental concept in internal controls and is the hardest and often the most expensive to achieve.

<em>This aim is accomplished by distributing the tasks and associated permissions among multiple people for a specific security system.</em>

7 0
3 years ago
Other questions:
  • If you want to import text into a DTP application that was first created in a word processing program, what must you do?
    9·2 answers
  • Who is the last person appointed to the u.s supreme court
    11·1 answer
  • What is processor, memory RAM, cDRAM,DVD RAM,video card​
    9·1 answer
  • Which of the following is most likely to be considered plagiarism? Using materials from a source without proper citation. Adding
    5·1 answer
  • I'm gonna get grounded for getting a 52 on my test :(
    13·1 answer
  • I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding
    10·1 answer
  • Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are give
    7·1 answer
  • Identify the parts of it, Give at least three web browser that you usually used to visit a website.​
    10·1 answer
  • Which option ensures that items in a text box or table cell will be in the absolute center of that element?
    12·1 answer
  • Which of the following describe the characteristics of a good logo? Choose all that apply. It is a complex design It is memorabl
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!