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
Darya [45]
3 years ago
13

Each week, the Pickering Trucking Company randomly selects one of its 30 employees to take a drug test. Write an application tha

t determines which employee will be selected each week for the next 52 weeks. Use the Math.random() function explained in Appendix D to generate an employee number between 1 and 30; you use a statement similar to:
Mathematics
1 answer:
konstantin123 [22]3 years ago
8 0

Answer:

In Java:

import java.util.Random;

public class Main{

public static void main(String args []){

  int Employee;

  for(int weeks = 1;weeks<=52;weeks++){

    Employee = 1 + (int)(Math.random() * 30);

    System.out.println("Week "+weeks+" selected employee: "+Employee);

  }

}

}

Step-by-step explanation:

This imports the Random package into the program

<em>import java.util.Random;</em>

public class Main{

public static void main(String args []){

Declare employee as integer (represents employee 1 to 30)

  int Employee;

Iterate from week 1 to 52

  for(int weeks = 1;weeks<=52;weeks++){

Randomly select an employee from 1 to 30 (inclusive)

    Employee = 1 + (int)(Math.random() * 30);

Print the selected employee

    System.out.println("Week "+weeks+" selected employee: "+Employee);

  }

}

}

You might be interested in
Frank has 6 red socks, 8 black socks, and 10 white socks in his sock drawer. If Frank blindly reaches into his sock drawer, what
Firlakuza [10]

Answer:

B

Step-by-step explanation:

The first probability is 10/24, and the second is 9/23. If you multiply these two fractoins you get 15/92. 15/92 is approximately equal to 16%.

4 0
3 years ago
Y=-2x²-8x-5 domain and range
Jobisdone [24]

Answer:

Domain: All real numbers

Range: y≤3

Step-by-step explanation:

The given function is

y =  - 2 {x}^{2}  - 8x - 5

This is a polynomial function.

The domain is set of all values of x, that makes this function defined.

Since polynomial functions are defined everywhere, the domain is all real numbers.

To find the range we put the function in vertex form:

y =  - 2( {x}^{2}  + 4x) - 5

y =  - 2( {x}^{2}  + 4x + 4) - 5 +  - 4 \times  - 2

y =  - 2( {x}  + 2)^{2} - 5 + 8

y =  - 2( {x}  + 2)^{2}  +  3

The maximum value is 3

The function turns downward, hence the range is:

y \leqslant 3

6 0
3 years ago
On a given day 32 out of 220 people were selected for
Lena [83]

Answer:74

Step-by-step explanation: first you need to find the ratio so divide 220 by 32 to get 6.875 then didvide 510 by that same number and you will get 74. 18181818 but 74 because you can’t have a fraction of a person

7 0
3 years ago
Solve the equation: [x-2]=[4+x]<br><br>x=
Whitepunk [10]
X-2 = 4+x
+2      +2
 x  = 6+x
 -x      -x
   0  = 6 

Answer: no solution / empty set  / ∅
6 0
3 years ago
Find the Area Of each circle.
Levart [38]

The area of the circle A and B is 86.54 inches and 124.62 mm

According to the statement

we have given that the radius of the circle A and b and we have to find the area of the given circle.

So, we know that the

The area enclosed by a circle of radius r is πr².

So, For area of the circle

For condition A :

diameter = 10.5 inches

then radius = 5.25

Area = πr²

Area = 3.14*27.56

Area = 86.54 inches

Now, For condition B :

radius = 6.3 mm

Area = πr²

Area = 3.14*39.69

Area = 124.62mm

So, The area of the circle A and B is 86.54 inches and 124.62 mm

Learn more about area of the circle here

brainly.com/question/15673093

#SPJ1

5 0
2 years ago
Other questions:
  • What is 290 million in scientific notation?
    8·2 answers
  • Y-2=4 (x-1) in Standard<br> form and steps
    5·1 answer
  • PLEASE HELP PLEASE PLEASE HELP
    5·2 answers
  • Simplify 6x^2/ cubed root of 3x
    9·1 answer
  • Michael is saving to buy his senior ring. The base cost of the ring is $280 plus any upgrades he wants to purchase. If he saves
    6·1 answer
  • How do I solve these problems?
    12·1 answer
  • Select the correct answer. What is the solution to the equation? 3(x+9) ^3/4 = 24
    13·1 answer
  • I need help please help my test is timed..
    7·1 answer
  • yesterday the temperature was 1 degree farenheit. today the temperature is 0 degree farhenheit. what is the change in tempeature
    7·1 answer
  • I WILL GIVE BRAINLYEST
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!