Each week, the Pickering Trucking Company randomly selects one of its 30 employees to take a drug test. Write an application that 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:

Answers

Answer 1

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

import java.util.Random;

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);

  }

}

}


Related Questions

Maria wants to spend less than $110. She wants to buy some shirts, s.
that are priced at $9 each. She also decided to buy a pair of high heels for
$60. WRITE THE INEQUALITY that represents the word problem to
determine the number of shirts she can buy.

Answers

she can buy 5 shirts

14. Molly puts two shapes together to make a new shape. The new shape has 6 sides and 6 vertices. Which two shapes did she use? ΔΔ OA in​

Answers

She used two trapezoids.

She put one trapezoid on top and one on the bottom.

The shape she ends up making is a hexagon.

Which graph COULD represent the table of values?
A)a
B)b
C)c
D)d

Answers

Answer:

Option 2 or B

Step-by-step explanation:

B, if you look at the data table, you can notice that x and y are decreasing (therefore going down). I hope this helps?

Howdoyouwrite
63
100
as percentage?

Answers

Answer:

Do you mean 63 over 100? If it you mean that the answer is 63%

(7x-11)+(6x-5)+(3x+6)+(4x+7)=

Answers

the answer is 20x - 3

have a wonderful day! :)

use an inequality symbol to compare -3 + 7 ____-10 -2​

Answers

Answer:

>

Step-by-step explanation:

-3 + 7 = 4

-10 - 2 = -12

4 > -12

Use the distributive property to simplify the expression 7 (8x+3).

7(8X+3=​

Answers

Answer:

56x+21

Step-by-step explanation:

7times 8x is 56x

7 times 3 is 21

add them together and you get 56x+21

Drag the uses of computers into the order in which they were developed​

Answers

warfare, business, entertainment, astronomy, arithmetic

help with this it is so hard

Answers

Answer:

its 4.8

Step-by-step explanation:

i divided 7.5 by 12.5 and got 0.6 and added 4.2 and got 4.8

Answer:

here is your answerrrrrrrrrrr

Meiling needed $5.35 to buy a ticket to a show. In her wallet, she found 2 dollar bills, 11 dimes, and 5 pennies. How much more money does Meiling need to buy the ticket?

Answers

Answer:

no she needs $2.20 more

Step-by-step explanation:

2+ 1.10+.05= $3.15

$5.35 - $3.15 = the answer

MIDDLE SCHOOL MATH On the subway 8 out of 10 people are carrying a briefcase. Based on this information, if there are 700 people on the subway, then about how many do NOT have a briefcase?

Answers

Answer:

140

Step-by-step explanation:

If 8 out of 10 are carrying a briefcase, that means 2 out of 10 are not carrying one.

Use a proportion to find how many don't have a briefcase with 700 people

Let x represent the number of people without a briefcase:

[tex]\frac{2}{10}[/tex] = [tex]\frac{x}{700}[/tex]

Cross multiply and solve for x

10x = 1400

x = 140

So, 140 people do not have a briefcase

Answer:

140

Step-by-step explanation:

8/10 people, there's 700 people

10 multiplied by 70 =700.

2 people dont have briefcases = 2 times 70=140

The length and width of a rectangle are 19.2 cm and 12.4cm respectively. Find the angle between a diagonal and the shorter side of the rectangle.

Answers

9514 1404 393

Answer:

  57.1°

Step-by-step explanation:

The sides of the rectangle are adjacent and opposite the angle, so the measure is ...

  α = arctan(opposite/adjacent) = arctan(19.2/12.4) ≈ 57.1°

The angle between the diagonal and the short side is about 57.1°.

A dress that is size x in France is equaivalent to size​ d(x) in the United​ States, where ​d(x)x32.
​(a). Find a function that will convert U.S. dress size to French dress size.
​(b) Use the inverse function to find the French size of a dress if it is U.S. size .

Answers

Answer:

[tex](a)\ d'(x) = x + 32[/tex] i.e. The inverse function

[tex](b)\ d'(10) = 42[/tex] i.e. The French size of a dress if it is U.S. size 10 is 42.

Step-by-step explanation:

Given

[tex]d(x) = x - 32[/tex]

Solving (a): The inverse function

[tex]d(x) = x - 32[/tex]

Replace d(x) with y

[tex]y = x - 32[/tex]

Swap y and x

[tex]x = y - 32[/tex]

Make y the subject

[tex]y = x + 32[/tex]

Replace y with d'(x)

[tex]d'(x) = x + 32[/tex]

Hence, the inverse function is: [tex]d'(x) = x + 32[/tex]

Solving (b): US size of 10

[tex]d'(x) = x + 32[/tex]

Substitute [tex]x =10[/tex]

[tex]d'(10) = 10 + 32[/tex]

[tex]d'(10) = 42[/tex]

Does this represent a function? Why or why not *explain*

Answers

Yes, everyone has their own input and output

Jacey has 40 pizzas to sell in the concession
stand at a basketball game. Each pizza has
been cut into 8 slices of equivalent size. In the
first hour, Jacey sold 16 3/8 pizzas. In the second
hour, she sold 18 3/4 pizzas. How many pizzas
does Jacey have left to sell?


Plz help

Answers

Answer:

the answer is 16.6 Pizzas

Step-by-step explanation:

16% of 40 is 6.4 that means she sold 6 full pizzas and 0.4 parts of one pizza

add that to 18 is 24.4 pizzas sold and 16.6 to go.

Please, my whole grade depends on this question!!!

Answers

Answer:

y = 14.4x - 18.4

Step-by-step explanation:

This is the equation for the regression line, I hope this helps!

Pls help mark barinlist

Answers

Answer:

okay sure Barnyst comingup

Step-by-step explanation:

-67.2-61.5−67.2−61.5

Answers

Answer:

-257.4

Step-by-step explanation:

-257.4 trust meh

Answer:

-257.4

mark as brainliest

The radius of a circle is 4 kilometers. Use 3.14 for ​. What is the circle's circumference?

Answers

C = πd
C = 3.14 x 9
C = 25.12

Which point is closest to the x-axis?
(4, 8)
(2, 11)
(8, 7)
(3, 13)

Answers

Answer:

B

Step-by-step explanation:

The other guy was wrong

   (4, 8)

   (2, 11)

✔(8, 7)

   (3, 13)

Find the value of x to the nearest degree.
A. 58
B. 52
C. 38
D. 32

Answers

Answer:

52⁰

Step-by-step explanation:

Cos x⁰ = adjacent/hypotenus

Cos x⁰ = 8/13

Cos x⁰ = 0.615

x⁰ = cos^-1 (0.615)

x⁰ = 52⁰

5. At Michael's store, a paint set is on sale for $39.99. The original price was
$66.65. What percent of the original price is the sale price?
PLS HURRY

Answers

around 50%

Step-by-step explanation:

because 30 of half of 60

Answer:

$ 26.66

Step-by-step explanation:

Minus the orignal price and the sale price and then you will get the answer

find the surface area of the figure below

Answers

You didn’t add a picture?

50 POINTS Vanessa has 6 dimes and 2 pennies. Joachim has 1 dollar, 3 dimes, and 5 pennies. Jimmy has 5 dollars and 7 pennies. They want to put their money together to buy a game that costs $8.00. Do they have enough money to buy the game? If not, how much more money do they need? SHOW WORK

Answers

Vanessa: a dime = 10 cents = 0.10

A penny = 1 cent = 0.01

6 x 0.10 = 0.60

2 x 0.01 = 0.02

Total = 0.60 + 0.02 = 0.62

Joachim : a dollar = 1.00

3 x 0.10 = 0.30

5 x 0.01 = 0.05

Total = 1.00 + 0.30 + 0.05 = 1.35

Jimmy: total = 5.00 + 0.07 = 5.07

Total of all 3: 0.62 + 1.35 + 5.07 = $7.04

This is less than $8 so they don’t have enough.

They need: 8.00 - 7.04 = $0.96 more

Answer:they need more money

Step-by-step explanation: they need 96 more cents

What is the height (h) of the prism?
3ft
6ft

Answers

6ft is the answer!! hope this helps :-)

Answer:

6ft

Step-by-step explanation:

The height is 6ft, because the 3 foot measurements are the width of the prism.

|X+1|+|x-2|=3. Can you please help me?

Answers

Answer:

I can answer if you make me brainliest

Find missing angle measure M

Answers

Answer:

m<Q = 30 degrees

Step-by-step explanation:

Add 126 and 24 which equals 150

Subtract 180 from 150

You get 30

If 4% of a number equals 3, find 8% of that number.

Answers

Answer:

I beleive your answer would be 6

8% of 75 is 6 and 4% of 75 is 3

Label each fifth on the number line. )
2.
3
4
2.
1
2
3
4
3
4
5
5
5
5
5
5
5
5
5
5
5
1
2
3
4
5
6
7
8.
0
Enter

Answers

Step-by-step explanation:

1 for 0/5

2 for 1/5

4 for 2\5

4 for 3\5

4 for 4\5

12 for 5\5

1 for 6\5

1 for 7\5

1 for 8\5

solve for t. 19 = 1/2 gt^2. ( Look at the picture for answer choices. Please Hurry and will give Brainliest. ​

Answers

Answer:

t=[tex]\sqrt{\frac{38}{g} }[/tex]

Step-by-step explanation:

19=(1/2)gt²

(multiply both sides by 2)

38=gt²

(divide both sides by g)

t²=(38/g)

(square root both sides)

t=[tex]\sqrt{\frac{38}{g} }[/tex]

Other Questions
what two types of energy does a rock have as it rolls down a hill The video covers three levels of care a wounded soldier experiences in a deployed environment. Select one of the levels of care and describe the likely roles/jobs and challenges that would be likely to occur at that level. A 45 foot ladder is set against the side of a house so that it reaches up 27 feet. If Latanya grabs the ladder at its base and pulls it 3 feet farther from the house, how far up the side of the house will the ladder reach now? (The answer is not 24 ft.) Round to the nearest tenth of a foot. plssssssssssssssssss helpppppppppppppppppppppppppppppppppppppppppppppppppp PLEASE HURRYLOgiving brainliest Rachel ran 5 miles every day last week. Her running time was as follows: 39min, 42 min, 41 min, 38 min, 39 min, 39min, 42min. What was her mean running time for 7 miles? Compute the force on each of two electrons when they are seperated in vaccum by a distance corresponding to the approximate size of an ato. (0.100nm) Debby used a garden hose to fill up a 4-gallon bucket in just 1/6 of a minute. At what rate does water flow through the hose? 7. A jogger runs three blocks south, two blocks east, 4 blocks north andtwo blocks west. What is the DISTANCE the jogger ran? * Solve the linear equation: 5 - x = (x/2) which of these acts protected under the first amendmentA.criticizing elected leaders B.selling drugs to childrenC.telling the military secrets to the enemy D.spreading untrue rumors to harm someone In a paragraph,How music has impact crime and violence in schools? HELPPPPP ME PLSSSS I NEED THE ANSWER SHOWN WITH WORK NO LINKS AND NO DOING IT JUST FOR POINTS WILL GIVE BRAINLIEST give 3 reasons why wealth is to be enjoyed give a little explanation The Supreme Court's ruling in Plessy v. Ferguson was problematic because? Old Man Warner's dialogue in the following passage (paragraph 32) mainly suggests... Used to be a saying about 'Lottery in June, corn be heavy soon.' First thing you know, we'd allbe eating stewed chickweed and acorns. There's always been a lottery," he added petulantly.Bad enough to see young Joe Summers up there joking with everybody."A. the power of a tradition like the lotteryB. that he is much wiser than the other villagersC. that the lottery is necessary for the village's survivalD. that he is the story's villain How does a pollutant affect the environment 2.) Olivia is borrowing $60 from her brother at 10% monthly interest. Theinterest is to be compounded every month, and her only repaymentwill be in full after 3 months. About how much will Olivia pay ininterest? Like in a cat's eye, the human pupil changes shape in response to changes inthe environment. What is the most likely function of this structure?A. To allow humans to readB. To allow humans to see clearly in different levels of lightC. To allow humans to see shades in colorD. To allow humans to see at varying distances Please help!Which expression is equivalent to (1/2x+6)-(1/4x+2)?A. 1/4 x - 4B. 1/4 x + 4C. 3/4 x - 4D. 3/4 x + 4 what is the range of the following data 7,5,9,10,1,2,2,8