Results 1 to 4 of 4

Thread: help!!

  1. #1
    thebest182 is offline Member
    Join Date
    Nov 2008
    Posts
    1
    Rep Power
    0

    Default help!!

    im no good at java but have to hand some assigments in

    How would i go about doing this.

    I have to model a roulette game and my starting amount is £2000 and i have to enter a lucky number at the start.

    in each round the system will generate a random number between 0 and 40 and the stake in each round is £2 . if the random number and your number coincide you will win £40 if not nothing happens and the stake is lost.

    What is the remaining amount after having played 100 rounds? and how many rounds can you play before losing all the money!!


    thanks for any help!!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default

    This should help you:
    The Java™ Tutorials

    db

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    You need a design/algorithm before you start coding.
    Write down the simple steps that need to be taken to do the job.
    0) initialize values
    1) get lucky number
    2) start loop (for 100 times)
    3) generate random number in range ...
    ...

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    You have to put an attempt first. Since you have a little experience on Java, start work on what you know. Once you stuck post your question with what you have done.

Posting Permissions

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