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
svetoff [14.1K]
4 years ago
11

Create a new Die object. (Refer to Die.html for documentation.)Create a loop that will iterate at least 100 times. In the loop b

ody:Roll the die. (Don't create a new object, just roll it again.)Based on the result of the roll, increment the corresponding cell of your array.
Computers and Technology
1 answer:
hjlf4 years ago
8 0

Answer:

Java code is given below

Explanation:

import java.util.Random;

class Die{

private int sides;

public Die(){

sides = 6;

}

public Die(int s){

sides = s;

}

public int Roll(){

Random r = new Random();

return r.nextInt(6)+1;

}

}

class DieRoll{

public static void main(String[] args) {

Die die = new Die();

int arr[] = new int[6];

for(int i=0; i<6; i++)

arr[i] = 0;

for(int i=0; i<100; i++){

int r = die.Roll();

arr[r-1]++;

}

for(int i=0; i<6; i++)

System.out.println((i+1)+" was rolled "+arr[i]+" times.");

}

}

You might be interested in
What are the<br>advontages of social medio?​
MrMuchimi

Answer: some advantages are making sure you’re informed about things going on in the world and connecting with you’re friends or even talking to family members. I hope this answered you’re question!

Explanation:

6 0
3 years ago
The keyboard and the mouse are types of BLANK devices
Stolb23 [73]
Input is the right answer.hope it helps.
3 0
3 years ago
Read 2 more answers
Why are video games addictive????<br> please write at least 3 reasons
timurjin [86]
It’s many people’s hobby
It gives a sense of adrenaline
You will try on and on to win or finish the mission
5 0
4 years ago
Regarding Group Policy in Windows Server 2008 and Windows Vista, Microsoft used the token-based administrative template (ADM) fi
melamori03 [73]

Answer:

ADMX files which is in XML file format.

Explanation:

Regarding Group Policy in Windows Server 2008 and Windows Vista, Microsoft used the token-based Administrative Template (ADM) files. Microsoft replaced ADM files with ADMX files (XML-based file format), and it is used in Windows Server 2012 and Windows Server 2012 R2.

ADMX files are registry-based policy settings used for defining the display of the Administrative Template (ADM) policy settings in the GPO Editor in an XML-based structure.

5 0
3 years ago
Is the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfa
klemol [59]

Answer:

customer-serious orientation

Explanation:

Customer-serious orientation can be defined as the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfaction.

This ultimately implies that, a customer-serious oriented business firm or company puts the needs, wants and requirements of its customers first without considering their own needs in a bid to satisfy and retain them.

Hence, customer-serious orientation requires the employees working in an organization to show and demonstrate positive attitudes and behaviors at all times.

6 0
3 years ago
Other questions:
  • Most colleges require blank years of foriegn language for admission
    9·1 answer
  • To retrieve an outlook express e-mail header right-click the message, and then click ____ to open a dialog box showing general i
    7·1 answer
  • Print Job Cost Calculator (10 points)
    14·1 answer
  • List the various types of social media that have been covered in the tutorial. Mention the key purposes for which each media typ
    9·1 answer
  • // GetData() method accepts order number and quantity // that are used in the Main() method // Price is $3.99 each using System;
    14·1 answer
  • What is a graphical user interface (GUI)?
    10·1 answer
  • Can someone please help me on these short short questions marking Brainly computer modeling people please help
    14·1 answer
  • Flash drive DVD and hard drive are all examples of
    6·2 answers
  • Why are visually interesting effects, such as WordArt, to be used sparingly?
    5·2 answers
  • // This pseudocode is intended to describe
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!