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
during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
icang [17]
Idk just need points
6 0
3 years ago
Michale spent 80 minutes at the libary he finished studying at 4:00 what time did michale start studying
Papessa [141]

Answer:

He finished at 2:40 P.M.

Explanation:

This is because 80 minutes= 1 hour and 20 minutes. Add 1 hour and 20 minutes to 2:40, which equals 4:00.

7 0
3 years ago
Give me at least five main characteristic of irrigation equipment​
ss7ja [257]

Answer:

flow control devices

filters

fertigation equipment

water emitters

automation equipment

operation equipment

water-lifting devices.

3 0
3 years ago
Re:
aksik [14]

Answer:

A) create new records

B) open and close forms

C) open database forms

F) navigate through records

G) import and export data

Explanation:

5 0
3 years ago
What is one reason why a business may want to move entirely online?
Sidana [21]

Answer:

The correct answer is C. One reason why a business may want to move entirely online is to focus on a global market.

Explanation:

The fact that a business wishes to move entirely towards the online sales modality implies that there is a desire to expand the possibilities of selling its products beyond the physical place where it has its store.

It is a reality that starting an online business implies that the offered product can be purchased anywhere in the world, thanks to advances in technology and transportation that allow the product to be purchased and delivered in a matter of days, thanks to the advances produced by globalization.

Therefore, the fact that the store goes from physically to online selling makes its potential customers go from being the ones who know the store and live close to it to everyone in the world with access to internet.

3 0
3 years ago
Other questions:
  • Brian is testing a banking application. He enters an input and expects a certain output. What is the actual output of the applic
    11·1 answer
  • What is the difference between www vs internet in information technology?
    13·1 answer
  • (It science question)
    9·1 answer
  • Which of the following is not true about designing classes? In order for class information to be printed instead of a memory add
    12·1 answer
  • How often does colleges update the cost of attendance on their website?.
    13·1 answer
  • Why is plastic durable?
    9·2 answers
  • Ten examples of an interpreter
    8·1 answer
  • Use the drop-down menus to complete the statements about changing mail options in Outlook.
    10·1 answer
  • Give me 4 examples of things to consider as a sound designer?<br> HURYYYYY IM TIMED
    11·1 answer
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!