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
Andru [333]
3 years ago
6

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: testedEmployee = 1 + (int) (Math.random() * 30); After each selection, display the number of the employee to test. Display four employee numbers on each line. It is important to note that if testing is random, some employees will be tested multiple times, and others might never be tested. Run the application several times until you are confident that the selection is random.

Computers and Technology
1 answer:
Sati [7]3 years ago
3 0

Answer:

Following are the program to this question:

import java.util.*; //import package

public class Main //defining class

{

 public static void main(String[] args) //defining main method

 {

   int testedEmployee; //defining integer variable

   for(int i = 1;i<=52;i++) //defining loop that counts from 1 to 52  

   {

     testedEmployee = 1 + (int) (Math.random() * 30); //using random method that calculate and hold value

     System.out.print(testedEmployee+"\t"); //print value

     if(i%4 == 0)//defining codition thats checks value is divisiable by 4  

     {

       System.out.println(); //print space

     }

   }

 }

}

Output:

please find the attachment.

Explanation:

In the given java program, a class Main is declared, inside the class, the main method is declared, in which an integer variable "testedEmployee", is declared, in the next line, the loop is declared, that can be described as follows:

  • Inside the loop, a variable "i" is declared, which starts from 1 and stop when its value is 52, inside the loop a random method is used, that calculates the random number and prints its value.
  • In the next step, a condition is defined, that check value is divisible 4 if this condition is true, it will print a single space.

You might be interested in
You are the IT Administrator for a small corporate network. Until now, the network has consisted only of workstations accessing
ser-zykov [4K]

Answer:

Explanation:

Since you are using Windows Server 2012 these tasks are much easier. In order to accomplish this, you simply need to click on Disk Management in the GUI and then right-click on the 200 GB drive and click on the option that says "Extend Drive". Finally, choose the max available space for the drive and click accept. This will extend the drive completely to use all of the space. The same process can be done for changing the Drive Letter and Volume Label by right-clicking the drive and choosing the corresponding option. In order to get convert the file system to NTFS (assuming it is Fat32) you simply need to open command prompt and type the following command.

convert m:  /fs:ntfs

where m is the actual drive letter of the drive in question.

8 0
3 years ago
How to see the range of values of vty lines?
PSYCHO15rus [73]

Answer:

To get the range of very lines in a switch or a router, in the global mode, type " line very" and the question mark after the space. It displays the ranges of valid very lines in the device.

Explanation:

Routers and switches are intermediate components of a computer network. They are used to connect various nodes and networks. For a remote connection, they use the virtual interface called vty to connect to computers for management purposes. These vty lines allows for SSH and telnet access from workstations and the range of very lines are predetermined and limited and varies for all switches and routers.

7 0
4 years ago
A Write about why it is important for a person to upgrade their job skills
Alexxx [7]

It is important for a person to upgrade their job skills because upgrading their skills will Increase their self-confidence, Helps to learn new techniques at work, Keep Your Knowledge Up-to-Date, increase your ability  in order to do your job well, and so on.

<u>Explanation:</u>

The most significant purposes behind abilities improvement in an association is for the development significant by and by and in an association. Workers need to remain learning so as to develop. At the point when you are going after another position, it's extremely significant that you can exhibit that you stay up with the latest. With certain callings, it's obligatory.

And, the more the abilities hole is developing, the more significant these three viewpoints become. This is on the grounds that we have to unmistakably comprehend whether it is information, expertise or capacity that should be created.

7 0
3 years ago
What does brainliest do?
balandron [24]

Answer it gives u points I think

Explanation:

6 0
3 years ago
Read 2 more answers
Dell's original business strategy was to only sell custom-built computer systems directly to customers. Dell now sells to major
Keith_Richards [23]

Dell was using the cost leadership strategy but is now using differentiation leadership strategy.

#learnwithBrainly

4 0
3 years ago
Other questions:
  • A forensic investigation discovered that accounts belonging to employees who were terminated numerous years ago were recently us
    9·1 answer
  • If you are working on a document and want to have Word automatically save the document every minute, what steps should you use t
    13·1 answer
  • Which of these is a Microsoft certification for system engineers?
    9·1 answer
  • What is my favorite color?<br> Red<br>Orange<br>Yellow<br>Blue <br>Gold<br>Silver
    13·1 answer
  • A good practice when using public domain content is to
    7·1 answer
  • What are some applications of computer in public administration?​
    8·1 answer
  • E commerce is the demand of modern society both for time and money
    14·2 answers
  • Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
    12·1 answer
  • THIS IS TIMED PLS HURRY UP
    7·1 answer
  • When network traffic is encrypted, it is invisible and its content and purpose are masked.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!