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
What type of attack is dependent on sending packets too large for the server to handle?
Art [367]
I think the answer is a kernel attack. Kernel attacks often send corrupted packets, but they also send large packets, allowing the server to crash and make an opening.
7 0
3 years ago
In theory, a(n) _____ can be an independent centralized database management system with proper interfaces to support remote acce
Vlad [161]

Answer:

Transaction Manger

Explanation:

Transaction Manger

Transaction Manager is responsible for transaction between resources that are available. It works as interface to support remote access form other systems in Data base management system.

8 0
3 years ago
If you must use a credit card while in college what are some ways you can keep from getting in credit card debt?
marin [14]

Answer:

Pay attention to what you buy and limit yourself to an amount of money everyday.

Explanation:

This is just a simple way from spending a lot and limits your everyday spendings when you actually leave an amount for yourself.

3 0
4 years ago
Drag the tiles to the correct boxes to complete the pairs.
arlik [135]

Smart devices is a technology trend, interest in renewable energy is a social trend, and buying solar panels and generators is a consumer trend.

4 0
3 years ago
Read 2 more answers
What is output by the following code segment? int x = 11; int y = 11; if (x != y ) { System.out.print("one"); } else if (x &gt;
meriva

The output will be four because y and x are equal and that satisfies the condition for the else if statement that prints out four.

3 0
3 years ago
Other questions:
  • Which tab would you click to access the autosum feature?
    9·1 answer
  • You are using a wireless client adapter with a site survey utility and a notebook computer to perform a manual site survey in a
    7·1 answer
  • Computer input is the process of translating physical signals (light, sound, movement) into which of the following?
    8·2 answers
  • Review the following statements and select the ones that are correct regarding sorting accounts from the Adjusted Trial Balance
    5·1 answer
  • Which is an example of synchronous communication? e-mail voicemail text message telephone conversation
    11·2 answers
  • In which part of a professional email should you try to be brief but highly descriptive a the blind carbon copy B the emoticon s
    10·1 answer
  • Hallo! Was ist die Hauptstadt von Northdakote wirklich schätzen, wenn jemand gefragt
    11·2 answers
  • Program 1: I’m buyin’ a Ferrari! If you’ve ever travelled to another country, you know that working with different currencies ta
    6·1 answer
  • What column, row, and text formatting issues are important when designing tables and lists?
    9·1 answer
  • ( No links) Which of these devices can be used to back up digital photographs?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!