Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2017
    Posts
    5
    Rep Power
    0

    Question 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.

    Totally clueless about how to create this program...-coursework.jpg

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,493
    Rep Power
    29

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

    What have you tried?
    Do you have any specific programming questions?
    If you don't understand my response, don't ignore it, ask a question.

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

    Default 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. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,493
    Rep Power
    29

    Default 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.
    If you don't understand my response, don't ignore it, ask a question.

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

    Default 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. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,493
    Rep Power
    29

    Default 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.
    If you don't understand my response, don't ignore it, ask a question.

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

    Question 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...

    Totally clueless about how to create this program...-coursework.jpg

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

    Default 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
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,493
    Rep Power
    29

    Default 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.
    If you don't understand my response, don't ignore it, ask a question.

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

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

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

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,493
    Rep Power
    29

    Default 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
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Clueless on an Array project
    By progamer3054 in forum New To Java
    Replies: 1
    Last Post: 11-21-2012, 08:58 PM
  2. Clueless as to what is wrong.
    By Biscuittickler in forum New To Java
    Replies: 7
    Last Post: 09-24-2012, 05:47 AM
  3. Im clueless, please help
    By truant420 in forum New To Java
    Replies: 14
    Last Post: 03-02-2011, 01:59 AM
  4. need help to create a GUI for this program
    By placidphyll in forum AWT / Swing
    Replies: 1
    Last Post: 11-17-2009, 05:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •