Answer:
easyy
Explanation:10 smaple runs and 2
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.");
}
}
Answer and Explanation:
Multiple-line comments :
Advantage :In the event that we need to remark out of zone of the given program , we can utilize it.
Disadvantage : In numerous line results are in reduced unwavering quality. It stretches out the remark as far as possible of the following comment.For least difficult approach to unintentionally leave off the last delimiter, which successfully expelling code from the program.
Single Line Comments :
Advantage :In the event that you need to close all the delimiter before close the program we utilize this kind of remarks.
Disadvantage : It put more burden on your program .It repeated on every line of a block of comments
A design for the software application