• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

10 Cards in this Set

  • Front
  • Back

The area of a square is stored in a double variable named area. Write an expression whose value is length of one side of the square.

Math.sqrt(area)

The area of a square is stored in a double variable named area. Write an expression whose value is length of the diagonal of the square.

Math.sqrt(area*2)

The length of a rectangle is stored in a double variable named length, the width in one named width. Write an expression whose value is the length of the diagonal of the rectangle.

Math.sqrt(Math.pow(length,2) + Math.pow(width,2))

If a right triangle has sides of length A, B and C and if C is the largest, then it is called the "hypotenuse" and its length is the square root of the sum of the squares of the lengths of the shorter sides (A and B). Assume that variables a and b have been declared as doubles and that a and b contain the lengths of the shorter sides of a right triangle: write an expression for the length of the hypotenuse.

Math.sqrt(Math.pow(a,2) + Math.pow(b,2))

The Math class provides a static method , max, that accepts twoint arguments and returns the value of the larger one.




Two int variables ,population1 and population2, have already been declared and initialized .




Write an expression (not a statement !) whose value is the larger of population1 and population2 by calling max.

Math.max(population1, population2)

Math.sqrt(Math.sqrt(x))

The Math class provides a static method , max, that accepts two int arguments and returns the value of the larger one.




Four int variables , population1, population2, population3, and population4 have already been declared and initialized .




Write an expression (not a statement !) whose value is the largest of population1, population2, population3, and population4 by calling max.

Math.max(Math.max(population1,population2),Math.max(population3,population4))

Write a character literal representing the (upper case) letter A.

'A'

Write a character literal representing a comma.

','

Write a character literal representing the digit 1.

'1'