Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please read the instructions carefully, all the generated numbers will be generated randomly . solve it please by JAVA Problem 1 (50 points) The game

please read the instructions carefully, all the generated numbers will be generated randomly. solve it please by JAVA

image text in transcribedimage text in transcribedimage text in transcribed

Problem 1 (50 points) The game starts with a list of random positive integer numbers such that their sum 45 . In each round, you subtract one from each number in the list and remove it if it becomes zero, add the sum of the subtracted numbers to the end of the list. The game is over when the list has 1,2,3,4,5,6,7,8, and 9 , in some order. In your program, print the list after each round. Here is a sample run of the program: [2,2,4,5,7,7,9,9] [1,1,3,4,6,6,8,8,8] [2,3,5,5,7,7,7,9] [1,2,4,4,6,6,6,8,8] [1,3,3,5,5,5,7,7,9] [2,2,4,4,4,6,6,8,9] [1,1,3,3,3,5,5,7,8,9] [2,2,2,4,4,6,7,8,10] [1,1,1,3,3,5,6,7,9,9] [2,2,4,5,6,8,8,10] [1,1,3,4,5,7,7,9,8] [2,3,4,6,6,8,7,9] [1,2,3,5,5,7,6,8,8] [1,2,4,4,6,5,7,7,9] [1,3,3,5,4,6,6,8,9] [2,2,4,3,5,5,7,8,9] [1,1,3,2,4,4,6,7,8,9] [2,1,3,3,5,6,7,8,10][1,2,2,4,5,6,7,9,9][1,1,3,4,5,6,8,8,9][2,3,4,5,7,7,8,9][1,2,3,4,6,6,7,8,8][1,2,3,5,5,6,7,7,9][1,2,4,4,5,6,6,8,9][1,3,3,4,5,5,7,8,9][2,2,3,4,4,6,7,8,9][1,1,2,3,3,5,6,7,8,9][1,2,2,4,5,6,7,8,10][1,1,3,4,5,6,7,9,9][2,3,4,5,6,8,8,9][1,2,3,4,5,7,7,8,8][1,2,3,4,6,6,7,7,9][1,2,3,5,5,6,6,8,9][1,2,4,4,5,5,7,8,9][1,3,3,4,4,6,7,8,9][2,2,3,3,5,6,7,8,9][1,1,2,2,4,5,6,7,8,9][1,1,3,4,5,6,7,8,10][2,3,4,5,6,7,9,9][1,2,3,4,5,6,8,8,8][1,2,3,4,5,7,7,7,9][1,2,3,4,6,6,6,8,9][1,2,3,5,5,5,7,8,9][1,2,4,4,4,6,7,8,9][1,3,3,3,5,6,7,8,9][2,2,2,4,5,6,7,8,9][1,1,1,3,4,5,6,7,8,9][2,3,4,5,6,7,8,10][1,2,3,4,5,6,7,9,8]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

Be familiar with the basic ways to manage capacity.

Answered: 1 week ago

Question

Be familiar with the five basic ways to manage demand.

Answered: 1 week ago