Question: Imagine you are asked to . . . Create a project called TestDice that contains a TestDice class and a Dice class. The Dice class

Imagine you are asked to ...
Create a project called TestDice that contains a TestDice class and a Dice class.
The Dice class stores information about one dice. A Dice has integers representing the number of sides and the value that is face up. Using the UML model below, create the private data members and methods belonging to a Dice object.
TestDice is the class with main() in it. Have it construct two Dice objects. Roll the pair of dice 10 times and show the values rolled. If both dice happen to roll the same number, output Doubles were rolled. Example output:
\table[[Dice 1,Dice 2],[3,5],[1,5],[6,2],[5,5],[6,1],[4,2],[... and so forth,]]
And to fully document both classes - top of file, all methods, all variables, all blocks.
Watch me in the short video series below and develop this program along side me. Then turn your program in by clicking the assignment title and submitting the two .java files.
UML for Dice class
\table[[-sides: int,the number of :],[-value: int,the value that v],[+Dice(),\table[[Default constru],[number of side],[dice]]],[,\table[[An overloaded],[initalizes the nt]]]]
 Imagine you are asked to ... Create a project called TestDice

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 Databases Questions!