Question: Write a Java program using the ArrayBag class to randomly assign money prizes to a group of lucky ( or unlucky ) people. The program

Write a Java program using the ArrayBag class to randomly assign money prizes to a group of lucky (or unlucky) people. The program should have 5 names added to a bag. It should then create a second bag of integers representing the following prizes: $100 $500 $50 $10,000 $0 Now using the grab method of the bags randomly pick out a name and a prize and print them together. Continue to print them out 5 times. Example: Dan won $100 Peter won $10,000 John won $0(sorry).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!