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
bezimeni [28]
2 years ago
12

(50 POINTS)

Computers and Technology
1 answer:
lana [24]2 years ago
5 0

Answer:

nope ;v

Explanation:

You might be interested in
1) Open the file DiceSimulation.java attached below. Create a new project on NetBeans called DiceSimulation. Copy the code from
trapecia [35]

Answer:

As per regulations, I can only answer the code in while loop.

Explanation:

Code in JAVA is given below for while loop

Please read all the comments for better understanding of the code.

Every step is explained well in the code.

Note class name is DiceSimulation.

Code in JAVA (Using while loop)::

import java.util.Random; // Needed for the Random class

/**

This class simulates rolling a pair of dice 10,000 times and counts the number of times doubles of are rolled for each different pair of doubles.

*/

public class DiceSimulation

{

public static void main(String[] args)

{

final int NUMBER = 10000; // Number of dice rolls

// A random number generator used in

// simulating the rolling of dice Random generator = new Random();

int die1Value; // Value of the first die

int die2Value; // Value of the second die

int count = 0; // Total number of dice rolls

int snakeEyes = 0; // Number of snake eyes rolls

int twos = 0; // Number of double two rolls

int threes = 0; // Number of double three rolls

int fours = 0; // Number of double four rolls

int fives = 0; // Number of double five rolls

int sixes = 0; // Number of double six rolls

// TASK #1 Enter your code for the algorithm here

/**

* Following while loop will run until count < Number.

*/

while(count<NUMBER){

/**

* To generate random number in range 1 to 6,

* I have declared two integer variables named min and max

* and initialized to 1 and 6 respectively.

*/

int min=1,max=6;

/**

* An object of Random class named rand is created so that we can generate

* random number.

*/

Random rand=new Random();

 

/**

* Using following formula we get random number in range 1 to 6.

* Both variables i.e die1Value and die2Value are initialized

* with the formula given in each iteration.

*/

die1Value = rand.nextInt((max - min) + 1) + min;

die2Value = rand.nextInt((max - min) + 1) + min;

 

/**

* Now we are interested in cases where there is double i.e

* Both random generated numbers in die1Value and die2Value are same.

*/

if(die1Value==die2Value){

/**

* Now there are 6 possibilities. They are shown in Nested IF-ELSE-IF statements.

* As both values are same, I have taken die1Value to check if it is 1,2,3,4,5 or 6.

*/

if(die1Value==1){

/**

* If die1Value is 1 then we increment snakeEyes by 1.

* Similarly for others too we do the same.

*/

snakeEyes++;

}else if(die1Value==2){

twos++;

}else if(die1Value==3){

threes++;

}else if(die1Value==4){

fours++;

}else if(die1Value==5){

fives++;

}else if(die1Value==6){

sixes++;

}

}

/**

* In each iteration we increment count by 1.

*/

count++;

}//While loop ends here.

// Display the results

System.out.println ("You rolled snake eyes " + snakeEyes + " out of " + count + " rolls.");

System.out.println ("You rolled double twos " + twos + " out of " + count + " rolls.");

System.out.println ("You rolled double threes " + threes + " out of " + count + " rolls.");

System.out.println ("You rolled double fours " + fours + " out of " + count + " rolls.");

System.out.println ("You rolled double fives " + fives + " out of " + count + " rolls.");

System.out.println ("You rolled double sixes " + sixes + " out of " + count + " rolls.");

 

}//main ends

}//class ends

4 0
3 years ago
Which of the following is NOT correct concerning database design? Question 2 options: Identify all fields needed to produce the
PtichkaEL [24]

The option which is not correct concerning database design is identify all fields needed to produce the required information.

What is database design?

The database design is the arrangement of the data or the information, according to the model of database.

Let's check all the option one by one,

  • Identify all fields needed to produce the required information- This does not concern with the database design.
  • Group related fields into tables-A relation database design consist of one or more than one related table. These tables are used together when the information is required.
  • Determine each table's primary key- To determine the table's primary key, is the concern with the database design.
  • Organize each piece of data into its largest useful part-The database design is the organization of data in the model of database.

The option which is not correct concerning database design is identify all fields needed to produce the required information.

Learn more about the database design here;

brainly.com/question/25694408

8 0
3 years ago
Which is considered the best way to secure a laptop to a desk in a workplace?
Lorico [155]

Answer:

Lock it in a safe is the best way to secure a  laptop to a  desk in a work space.

Explanation:

Since the end user feels that a laptop can be stolen or taken by others is a safe way to keep hire or her laptop in a  safe place.

Bolt  it:-  it is  not possible, because there   is  no   option available

Lock  it is safe:- this  is  idle or best  solution is  safe his or her laptop

Use an alarm :- the person   who steals the laptop will be more intelligent and he or she knows how to disable the alarm system.

Use  cable lock;- it is easy to remove it.

3 0
3 years ago
What are some example of popular music for teenagers
Stells [14]

Answer: Hip Hop, Rap, Alternative, Pop Rock

Explanation:

8 0
3 years ago
Read 2 more answers
Overcoming the fundamental attribution error requires making an effort to shift an external attribution into an internal attribu
Irina-Kira [14]

The correct answer on Edgen is:

(B.) False

I just took the test and this is the right answer.

8 0
4 years ago
Read 2 more answers
Other questions:
  • If the task is to write firewall specifications for the preparation of a(n) ____, the planner would note that the deliverable is
    14·1 answer
  • In a(n) ________ either one condition or some other condition must be met in order for an event to take place.
    11·1 answer
  • Chevening is looking for individuals with strong professional relationship building skills, who will engage with the Chevening c
    15·1 answer
  • Ethics in businesses and organizations are made up of a set of moral principles that guide the organizations. Discuss how good w
    8·1 answer
  • Which of the following statements about creating arrays and initializing their elements is false?
    6·1 answer
  • Write an essay of at least 300 words explaining your position on a proposed ban of Wikipedia in your future college. You should
    12·1 answer
  • Write a method intersect that accepts two sorted array lists of integers as parameters and returns a new list that contains only
    8·1 answer
  • Brainliest forrrrrrr frrrrrew right herrreeee
    14·1 answer
  • Write ONE SQL statement for each of the following tasks. Note that you can only use conditions specified in the task description
    5·1 answer
  • Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Te
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!