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
Law Incorporation [45]
3 years ago
14

Write a program that randomly (using the random number generator) picks gift card winners from a list of customers (every custom

er has a numeric ID) who completed a survey. After the winning numbers are picked, customers can check if they are one of the gift card winners. In your main function, declare an integer array of size 10 to hold the winning customer IDs (10 winners are picked). Pass the array or other variables as needed to the functions you write. For each step below, decide what arguments need to be passed to the function. Then add a function prototype before the main function, a function call in the main function and the function definition after the main function.
Computers and Technology
1 answer:
Fofino [41]3 years ago
8 0

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;

   }

}

You might be interested in
A camera in manual mode means of the camera will make all the adjustments for the photographer
galben [10]
Manual mode is when the photographer makes all the adjustments themself
7 0
4 years ago
A user calls you and says that when they try to connect to the internal website, they are prompted for authentication. The user
Kazeer [188]

Answer:

The Local site's URL should be added to the Local internet zone.

Explanation:

3 0
3 years ago
What should you do in order to have access to the header and footer tools? Open the View tab. Open the Page Setup dialog box. Op
Svetach [21]

Answer:

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

Explanation:

In order to access to the header and footer tools

Step 1  - Open the View tab.

Step 2 - Open the Page Setup dialog box

Step 3 - Open the header and footer tool.

Step 4 - Click OK.

4 0
3 years ago
Microsoft Paint can be described as a digital sketch pad ?
alexira [117]
Yes I can be be a digital sketch pad

HOPE THIS HELPS!!!!!!!
4 0
3 years ago
Who was the founder of the location-sharing site Whrrl
Lilit [14]
By Pelago, INC. Founders of Pelago are: Jeff Holden<span> and </span><span>Darren Vengroff.</span>
3 0
3 years ago
Other questions:
  • Whats the 7 internal components found in a computer tower
    11·1 answer
  • Explain the steps you take to complete an Internet search. Do you use a particular search engine every time or do you alternate?
    12·1 answer
  • Emma has decided that she needs to assess the risk and return of buying an extended warranty for her new laptop for school
    15·1 answer
  • How to change font size and style and add a table when creating a webpage?
    6·1 answer
  • Your computer is taking longer than usual to open files and you notice that your hard drive light stays on longer than usual. wh
    5·2 answers
  • The general who directed the project responsible for the "Fat Man” graduated from what alma mater in 1918? Hint: W___ P____.
    10·1 answer
  • How to find out if your Mac has been hacked
    12·1 answer
  • How is a composite key implemented in a relational database model?
    11·1 answer
  • which feature of organisations to manage needs to know about to build and use information system successfully
    6·1 answer
  • Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!