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:
Incremental technique is the way in which software is built and delivered in pieces. The concept is to keep the client and developer on same page and the client is known as a non tech person, so he should be given software in piece by piece to avoid any confusion and sudden change.
Agile method is the best example of this technique in which steps are defined on contract basis and the software is delivered and build by pieces to keep client and developer on same page.