java编程问题 急In rolling a dice one of the six sides will appear uppermost.If a dice is rolled many thousands of times,each of the six sides should appear uppermost approximately the same number of times.Write a program that counts the number o

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 00:56:42
java编程问题 急In rolling a dice one of the six sides will appear uppermost.If a dice is rolled many thousands of times,each of the six sides should appear uppermost approximately the same number of times.Write a program that counts the number o

java编程问题 急In rolling a dice one of the six sides will appear uppermost.If a dice is rolled many thousands of times,each of the six sides should appear uppermost approximately the same number of times.Write a program that counts the number o
java编程问题 急
In rolling a dice one of the six sides will appear uppermost.If a dice
is rolled many thousands of times,each of the six sides should appear uppermost
approximately the same number of times.Write a program that counts the number
of times each of the six sides appears uppermost when a dice is rolled a given
number of times .At the end of the trial,display the number of times each of the
six sides appeared uppermost.
Define a Dice class with only one attribute to keep an integer (between one and
six) for the side that is displaying at a given moment and a method to simulate
the rolling of a dice.Define a driver class which has two attributes.One is an array
freq containing six integers.For each i between zero and five freq[i] will store the
number of times number i+1 appears in the trail.The second attribute stores the
length of a trial.

java编程问题 急In rolling a dice one of the six sides will appear uppermost.If a dice is rolled many thousands of times,each of the six sides should appear uppermost approximately the same number of times.Write a program that counts the number o
先占个位置,保证给你写出来!
请选我为最佳答案,谢谢!