1. Member
Join Date
Jan 2017
Posts
5
Rep Power
0

## Totally clueless about how to create this program...

Hi guys, I'm totally new here and totally new to java. I've got some college coursework which needs to be handed in tomorrow and I'm really struggling! If anyone could help me out and point me in the right direction it would be greatly appreciated! I am totally clueless about how to do this...

Look at the following design, this is a generic top down design. Create the program and test it. You must justify any assumptions you make.

2. ## Re: Totally clueless about how to create this program...

What have you tried?
Do you have any specific programming questions?

3. Member
Join Date
Jan 2017
Posts
5
Rep Power
0

## Re: Totally clueless about how to create this program...

Well I don't understand the flowchart fully. It doesn't have a start/end point or arrows like the ones I'm used to. I also don't understand how I would get the program to "throw 3 dice".

4. ## Re: Totally clueless about how to create this program...

a start/end point
I'd guess that the column of rectangles to the right of the "Dice game" rectangle is a list of the steps the program is supposed to take.
First is a "Welcome" and last is a test of the score to see who won.

how I would get the program to "throw 3 dice".
Define what it means to "throw" a die, call it 3 times and save the results of each throw.

5. Member
Join Date
Jan 2017
Posts
5
Rep Power
0

## Re: Totally clueless about how to create this program...

Okay thank you, I think I understand the flowchart now but I'm still stuck with defining what it means to throw throw the dice. A dice gives a random number from 1-6 but how do I get the code to do that?

6. ## Re: Totally clueless about how to create this program...

gives a random number from 1-6
Look at the Random class. It has a method the will return a value in a given range.

7. Member
Join Date
Jan 2017
Posts
5
Rep Power
0

## Generating a random number.

I posted a thread about this before but for some reason I cant reply to it anymore. Please can someone help me with my coursework? I need to generate a random number from 1 - 6 but I'm not sure how. All the info I can find is pretty confusing. This is the program I am trying to make...

8. Senior Member
Join Date
Jan 2013
Location
Northern Virginia, United States
Posts
5,739
Rep Power
10

## Re: Totally clueless about how to create this program...

Personally, I think this is a terrible flowchart. In a properly designed flowchart, there should be no guess work as to what order something should be performed. This flowchart simply doesn't flow.

Regards,
Jim

9. ## Re: Totally clueless about how to create this program...

generate a random number from 1 - 6
Use the Random class's method that returns an int value in a specific range.

10. Member
Join Date
Jan 2017
Posts
5
Rep Power
0

## Re: Totally clueless about how to create this program...

I am not sure how to do this. Where can I find out?

11. ## Re: Totally clueless about how to create this program...

how to do this.
What is the "this" you are having problems with?

See the API doc for the Random class: http://docs.oracle.com/javase/8/docs/api/index.html