subject

Challenge 16A - Rolling Dice package: chall16A
class: Main, Dice

Part 1

Create a class called "Dice" which we will use to instantiate a pair of six-sided cubes we generally call "Dice".

The class should keep track of its face value
It should be able to roll a random number between 1-6.
Constructor should store die value.
It should be able to return the face value when called.
Part 2

Create a methods for rolling the dice.

One method for returning the value of a single dice roll.
One method for returning the sum of a pair of dice rolled.
You need to be able to access the individual face values of each Die.
Part 3

In the Main driver class create a program that rolls a single Die 1000 times and calculates the percentage of times it rolls a six.

Part 4

In the Driver class create another program that rolls a pair of dice and calculates the percentage of times out of 1000 you roll 2 –ones (Snake Eyes) and the number of times you roll just 1 – one.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
Python. primary u.s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west.
Answers: 1
You know the right answer?
Challenge 16A - Rolling Dice package: chall16A
class: Main, Dice

Part 1
Questions
question
Mathematics, 26.10.2020 22:00
question
Mathematics, 26.10.2020 22:00
question
History, 26.10.2020 22:00
Questions on the website: 13722362