Part 1:
You will use the Random function to write the following JAVA program. Write a program named Dice4.java.
The minimum number generated by the two dice is 2 and maximum number is 12. Throw the dice and if the number generated is less than or equal to 3 than you lose and if it is greater or equal to 9 than you win and if you get a number between 4-8 then it is a tie. You will make use of Random function and a selection structure (if/else) to write the code.
Save the document as Dice4.java.
Comments
Leave a comment