|
HWJ8_Random
You are going to create a class called HWJ8_Random that will either
flip a coin, roll a dice, or receive a card.
Everybody do 3, advanced do all. Really advanced do extension.:
- a method called flipCoin that will flip a coin, System.out.println
the results, AND return a boolean (true for heads, false for tails)
- a method called rollDice that will roll one die, System.out.println
the results, AND return the number rolled.
- a method called roll2Dice that will roll 2 dice, System.out.println
the results of each die, AND return an int with the sum of the
outcome (2-12). I want you to call rollDice in this method.
- method called dealCard that will choose a random card, System.out.println
the results, AND return a String with the outcome (ie 6 of hearts)
3 POINTS DUE Monday - counts towards next quarter
|