Respuesta :
Answer:
Explanation:
Since no customer ID information was provided, after a quick online search I found a similar problem which indicates that the ID's are three digit numbers between 100 and 999. Therefore, the Java code I created randomly selects 10 three digit numbers IDs and places them in an array of winners which is later printed to the screen. I have created an interface, main method call, and method definition as requested. The picture attached below shows the output.
import java.util.Random;
interface generateWinner {
public int[] winners();
}
class Brainly implements generateWinner{
public static void main(String[] args) {
Brainly brainly = new Brainly();
int[] winners = brainly.winners();
System.out.print("Winners: ");
for (int x:winners) {
System.out.print(x + ", ");
}
}
public int[] winners() {
Random ran = new Random();
int[] arr = new int[10];
for (int x = 0; x < arr.length; x++) {
arr[x] = ran.nextInt(899) + 100;
}
return arr;
}
}