Details of this Paper

Write a java application that generates the roll of two

Description

solution


Question

Write a java application that generates the roll of two (six sided) dice ten times. Write a method (doubles) which will return true if both random numbers are the same. Write another method (sevens) which will return true if the total of the two dice is 7. Pass the randomly generated roll of each die to each method. In you main method ? generate two random numbers between 1- 6, display the two numbers, display ?doubles were rolled? if doubles returns true, display ?the roll totaled 7? if sevens returns true, accumulate and display the number of doubles that were rolled and the number of sevens rolled.;Name the program Dice with your two initals following.;Example: Dicelb;Write a java application that generates the roll of two (six sided) dice ten times. Write a method (doubles) which will return true if both random numbers are the same. Write another method (sevens) which will return true if the total of the two dice is 7. Pass the randomly generated roll of each die to each method. In you main method ? generate two random numbers between 1- 6, display the two numbers, display ?doubles were rolled? if doubles returns true, display ?the roll totaled 7? if sevens returns true, accumulate and display the number of doubles that were rolled and the number of sevens rolled.;Name the program Dice with your two initals following.;Example: Dicelb

 

Paper#69202 | Written in 18-Jul-2015

Price : $27
SiteLock