Cuyahoga Community College Passing the Dice Rolling Method Lab

For this lab, start with your completed lab 13.

Now, instead of just passing the dice rolling method the number of dice to roll, also pass a second value. This second value should be the size of the dice.

  • In D&D, there are 4, 6, 8, 10, 12, 20, 30 etc… sided dice.
    • So, perhaps you will tell the method to roll 2, 6 sided dice.
    • Or perhaps you will tell the method to roll 1, 8 sided die.
    • Or maybe even you will tell the method to roll 13, 9 sided dice. (not sure if that is a thing…)

So, in this case, your roll dice method must accept two parameters.

Hint:

So far, when using random, we have gone from a set range such as:

rnd.next(1, 7);

How can you change that line (it will be the 7 that gets changed) to accommodate a value that isn’t known before the program is executed?

You can leave a response, or trackback from your own site.

CLICK ORDER NOW TO GET A CUSTOMIZED PAPER ON THIS TOPIC JUST FOR YOU!! 0%PLAGIARISM 100% ORIGINAL PAPER

2 Responses to “Cuyahoga Community College Passing the Dice Rolling Method Lab”

  1. 268479 725789Will you care and attention essentially write-up most of the following in my webpage in essence your site mention of this blog? 480574

  2. 105991 391581An interesting discussion is worth comment. I do think which you should write read far more about this subject, it will not be considered a taboo subject but usually every person is too couple of to communicate in on such topics. To yet another. Cheers 105121

Leave a Reply

Powered by WordPress | Designed by: buy backlinks | Thanks to webdesign berlin, House Plans and voucher codes