You would like to give away an awesome prize to one lucky person in the class that is selected randomly. 1. Write a prog
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You would like to give away an awesome prize to one lucky person in the class that is selected randomly. 1. Write a prog
You would like to give away an awesome prize to one lucky person in the class that is selected randomly. 1. Write a program that lets the user type in names. Each name that is entered should be stored in an ArrayList of type String. When the word "quit" is entered then the program should stop inputting names. 2. Print a list of all contestants using a "for each" loop to display the contents of your ArrayList 3. Then your program should generate a random number that could be any entry in the ArrayList and print out the name of the lucky winner.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!