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
Any1 answer for me? pls
disa [49]
Give me a few secs brb
5 0
3 years ago
NEED HELP ASAP | 25+ POINTS | IM BEGGING PLZ HELP | I NEED HELP NOW!!
Nady [450]

Answer:

  • 14 ft and 30 ft

Step-by-step explanation:

<u>Perimeter is</u>

<em>P = 2(l+w), where l= length, w = width</em>

  • P = 88
  • l = w + 16

<u>Substitute values to find the value of w:</u>

  • 88 = 2(w + 16 + w)
  • 2w + 16 = 44
  • 2w = 28
  • w = 14

Then

  • l = 14 + 16 = 30

Dimensions are 14 ft and 30 ft

8 0
4 years ago
Read 2 more answers
Landon usually eats two slices of pizza from a 12 inch pizza cut into 6 slices. I make homemade pizza on a rectangular cookie sh
LUCKY_DIMON [66]

Answer:

He will eat 0.233 of one slice

Step-by-step explanation:

If Landon eats only two slices of pizza from a 12 inch pizza cut into 6

It means each slice has 2 inch pizza and Landon eats 2 of these

So Landon eats 2*2 = 4 inch pizza

So a rectangular pizza of 10 by 15

= 10*15

= 150 inch pizza

Cut into 8 slices

= 150/8

.= 18.75 inch per slice

4/18.75 = 0.233

He will eat 0.233 of one slice

4 0
4 years ago
When surveyed 5 out of 32 students said they ride their bikes to school. Predict how many students in a school of 800 ride their
yKpoI14uk [10]

Answer:125 students

Step-by-step explanation:if 5 out of every 32 students bikes

5=32

X=800

800(5)=4000

4000/32=125

7 0
3 years ago
Find X please I really need help. Explain the best you can! Thanks!
ludmilkaskok [199]
3x+45=90
3x=90-45
3x=45
3x/3=45/3
x=15
6 0
3 years ago
Other questions:
  • Which of the expressions (on the photo document I inserted) together represent all solutions to the following equation?
    11·1 answer
  • Answer this question please.
    15·1 answer
  • Seventy-five percent, or 15, of the students in Emily’s homeroom class are going to a grill trip. Two thirds, or 12, of the stud
    6·1 answer
  • What is unlike denominators
    11·2 answers
  • This month salesperson A made 11% of $67,530. Salesperson B made 8% of 85,740. Who made more commission this month? How much did
    6·1 answer
  • Find the mean and the median of the data set. 31,32,36,31,30,35,33,30.
    5·2 answers
  • On a number line, 1.43 would be located.choose all answers a true statement
    7·1 answer
  • 17. Find the degree measure of each angle on the triangle (giving BRAINLY to best answer and points)​
    15·1 answer
  • HELPPP ASAPPPPPPPPOPPPPPPPPPP
    8·2 answers
  • The graph of F(x), shown below, resembles the graph of G(x)= x², but it has
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!